Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamasmeszaros <meszaros.q@gmail.com>2020-04-28 21:39:47 +0300
committertamasmeszaros <meszaros.q@gmail.com>2020-04-28 21:39:47 +0300
commit985225cd387cc6c88549ade2bc81c10c87726070 (patch)
treed393e4054b53c997613c0b1026d163f383e863c5 /src/CMakeLists.txt
parent4de4d765ee582879ba0c310b4fa89c260a5d14ad (diff)
Try to fix build with old wxwidgets builtin png and expat
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index cdc8e0a13..7509ad474 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -59,9 +59,17 @@ if (SLIC3R_GUI)
include(${wxWidgets_USE_FILE})
- list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX png)
- list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX expat)
- list(APPEND wxWidgets_LIBRARIES ${PNG_LIBRARIES} ${EXPAT_LIBRARIES})
+ 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})
+ 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)
message(STATUS "wx libs: ${wxWidgets_LIBRARIES}")
@@ -182,13 +190,13 @@ if (WIN32)
elseif (XCODE)
# 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
- 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"
VERBATIM
)
else ()
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"
VERBATIM
)