Try to fix build with old wxwidgets builtin png and expat
This commit is contained in:
parent
4de4d765ee
commit
985225cd38
1 changed files with 13 additions and 5 deletions
|
@ -59,9 +59,17 @@ if (SLIC3R_GUI)
|
||||||
|
|
||||||
include(${wxWidgets_USE_FILE})
|
include(${wxWidgets_USE_FILE})
|
||||||
|
|
||||||
list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX png)
|
string(REGEX MATCH "wxpng" WX_PNG_BUILTIN ${wxWidgets_LIBRARIES})
|
||||||
list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX expat)
|
if (PNG_FOUND AND NOT WX_PNG_BUILTIN)
|
||||||
list(APPEND wxWidgets_LIBRARIES ${PNG_LIBRARIES} ${EXPAT_LIBRARIES})
|
list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX png)
|
||||||
|
list(APPEND wxWidgets_LIBRARIES ${PNG_LIBRARIES})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
string(REGEX MATCH "wxexpat" WX_EXPAT_BUILTIN ${wxWidgets_LIBRARIES})
|
||||||
|
if (EXPAT_FOUND AND NOT WX_EXPAT_BUILTIN)
|
||||||
|
list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX expat)
|
||||||
|
list(APPEND wxWidgets_LIBRARIES ${EXPAT_LIBRARIES})
|
||||||
|
endif ()
|
||||||
|
|
||||||
# list(REMOVE_ITEM wxWidgets_LIBRARIES oleacc)
|
# list(REMOVE_ITEM wxWidgets_LIBRARIES oleacc)
|
||||||
message(STATUS "wx libs: ${wxWidgets_LIBRARIES}")
|
message(STATUS "wx libs: ${wxWidgets_LIBRARIES}")
|
||||||
|
@ -182,13 +190,13 @@ if (WIN32)
|
||||||
elseif (XCODE)
|
elseif (XCODE)
|
||||||
# Because of Debug/Release/etc. configurations (similar to MSVC) the slic3r binary is located in an extra level
|
# Because of Debug/Release/etc. configurations (similar to MSVC) the slic3r binary is located in an extra level
|
||||||
add_custom_command(TARGET PrusaSlicer POST_BUILD
|
add_custom_command(TARGET PrusaSlicer POST_BUILD
|
||||||
COMMAND ln -sf "${SLIC3R_RESOURCES_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/resources"
|
COMMAND ln -sfn "${SLIC3R_RESOURCES_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/resources"
|
||||||
COMMENT "Symlinking the resources directory into the build tree"
|
COMMENT "Symlinking the resources directory into the build tree"
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
else ()
|
else ()
|
||||||
add_custom_command(TARGET PrusaSlicer POST_BUILD
|
add_custom_command(TARGET PrusaSlicer POST_BUILD
|
||||||
COMMAND ln -sf "${SLIC3R_RESOURCES_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/../resources"
|
COMMAND ln -sfn "${SLIC3R_RESOURCES_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/../resources"
|
||||||
COMMENT "Symlinking the resources directory into the build tree"
|
COMMENT "Symlinking the resources directory into the build tree"
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue