Fix messed up wx find procedure
This commit is contained in:
parent
db8c57b938
commit
088e34740e
@ -57,31 +57,13 @@ if (SLIC3R_GUI)
|
||||
|
||||
include(${wxWidgets_USE_FILE})
|
||||
|
||||
find_package(JPEG QUIET REQUIRED)
|
||||
find_package(TIFF QUIET REQUIRED)
|
||||
find_package(JPEG QUIET)
|
||||
find_package(TIFF QUIET)
|
||||
|
||||
string(REGEX MATCH "wxpng" WX_PNG_BUILTIN ${wxWidgets_LIBRARIES})
|
||||
if (NOT WX_PNG_BUILTIN)
|
||||
find_package(JPEG QUIET)
|
||||
if (PNG_FOUND)
|
||||
list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX png)
|
||||
list(APPEND wxWidgets_LIBRARIES ${PNG_LIBRARIES})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
string(REGEX MATCH "wxtiff" WX_TIFF_BUILTIN ${wxWidgets_LIBRARIES})
|
||||
if (NOT WX_TIFF_BUILTIN)
|
||||
find_package(TIFF QUIET)
|
||||
if (TIFF_FOUND)
|
||||
list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX tiff)
|
||||
list(APPEND wxWidgets_LIBRARIES ${TIFF_LIBRARIES})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
string(REGEX MATCH "wxjpeg" WX_JPEG_BUILTIN ${wxWidgets_LIBRARIES})
|
||||
if (TIFF_FOUND AND NOT WX_JPEG_BUILTIN)
|
||||
list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX jpeg)
|
||||
list(APPEND wxWidgets_LIBRARIES ${JPEG_LIBRARIES})
|
||||
if (PNG_FOUND AND NOT WX_PNG_BUILTIN)
|
||||
list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX png)
|
||||
list(APPEND wxWidgets_LIBRARIES ${PNG_LIBRARIES})
|
||||
endif ()
|
||||
|
||||
string(REGEX MATCH "wxtiff" WX_TIFF_BUILTIN ${wxWidgets_LIBRARIES})
|
||||
@ -91,7 +73,7 @@ if (SLIC3R_GUI)
|
||||
endif ()
|
||||
|
||||
string(REGEX MATCH "wxjpeg" WX_JPEG_BUILTIN ${wxWidgets_LIBRARIES})
|
||||
if (TIFF_FOUND AND NOT WX_JPEG_BUILTIN)
|
||||
if (JPEG_FOUND AND NOT WX_JPEG_BUILTIN)
|
||||
list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX jpeg)
|
||||
list(APPEND wxWidgets_LIBRARIES ${JPEG_LIBRARIES})
|
||||
endif ()
|
||||
@ -101,6 +83,7 @@ if (SLIC3R_GUI)
|
||||
list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX expat)
|
||||
list(APPEND wxWidgets_LIBRARIES ${EXPAT_LIBRARIES})
|
||||
endif ()
|
||||
|
||||
# This is an issue in the new wxWidgets cmake build, doesn't deal with librt
|
||||
find_library(LIBRT rt)
|
||||
if(LIBRT)
|
||||
|
Loading…
Reference in New Issue
Block a user