Extend wx png and expat fixes for all of its built-in libraries

That means adding tiff and jpeg
This commit is contained in:
tamasmeszaros 2021-03-30 12:56:37 +02:00
parent 3fce8398f0
commit fabb6716ee

View file

@ -58,9 +58,27 @@ if (SLIC3R_GUI)
include(${wxWidgets_USE_FILE})
string(REGEX MATCH "wxpng" WX_PNG_BUILTIN ${wxWidgets_LIBRARIES})
if (PNG_FOUND AND NOT WX_PNG_BUILTIN)
list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX png)
list(APPEND wxWidgets_LIBRARIES ${PNG_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})
endif ()
string(REGEX MATCH "wxexpat" WX_EXPAT_BUILTIN ${wxWidgets_LIBRARIES})
@ -68,7 +86,6 @@ 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)