Fix build on windows

Remove DEP_DEBUG feature on non MSVC platforms, it does not work nicely (due to Qhull)
This commit is contained in:
tamasmeszaros 2023-08-11 15:42:07 +02:00
parent c990137cf8
commit a8ba4f7ca9
3 changed files with 7 additions and 4 deletions

View File

@ -592,12 +592,12 @@ function(prusaslicer_copy_dlls target)
# This has to be a separate target due to the windows command line lenght limits # This has to be a separate target due to the windows command line lenght limits
add_custom_command(TARGET ${target} POST_BUILD add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${TOP_LEVEL_PROJECT_DIR}/deps/GMP/gmp/lib/win${_bits}/libgmp-10.dll ${_out_dir} COMMAND ${CMAKE_COMMAND} -E copy ${TOP_LEVEL_PROJECT_DIR}/deps/+GMP/gmp/lib/win${_bits}/libgmp-10.dll ${_out_dir}
COMMENT "Copy gmp runtime to build tree" COMMENT "Copy gmp runtime to build tree"
VERBATIM) VERBATIM)
add_custom_command(TARGET ${target} POST_BUILD add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${TOP_LEVEL_PROJECT_DIR}/deps/MPFR/mpfr/lib/win${_bits}/libmpfr-4.dll ${_out_dir} COMMAND ${CMAKE_COMMAND} -E copy ${TOP_LEVEL_PROJECT_DIR}/deps/+MPFR/mpfr/lib/win${_bits}/libmpfr-4.dll ${_out_dir}
COMMENT "Copy mpfr runtime to build tree" COMMENT "Copy mpfr runtime to build tree"
VERBATIM) VERBATIM)

View File

@ -1,4 +1,7 @@
include(GNUInstallDirs) include(GNUInstallDirs)
# WARNING: Qhull does this nice thing to remove previous configs when installing.
# It does that only on Unix. If you build release, then install, then build
# debug, then install, it will delete the previous release config....
add_cmake_project(Qhull add_cmake_project(Qhull
URL "https://github.com/qhull/qhull/archive/v8.0.1.zip" URL "https://github.com/qhull/qhull/archive/v8.0.1.zip"
URL_HASH SHA256=5287f5edd6a0372588f5d6640799086a4033d89d19711023ef8229dd9301d69b URL_HASH SHA256=5287f5edd6a0372588f5d6640799086a4033d89d19711023ef8229dd9301d69b

4
deps/CMakeLists.txt vendored
View File

@ -208,7 +208,7 @@ dep_message(STATUS "Building dep targets (${CMAKE_BUILD_TYPE}): ${_build_list}")
add_custom_target(deps ALL DEPENDS ${_build_list_toplevel}) add_custom_target(deps ALL DEPENDS ${_build_list_toplevel})
# Support legacy option DEP_DEBUG on MSVC to build debug libraries in the same cmake run as for CMAKE_BUILD_TYPE: # Support legacy option DEP_DEBUG on MSVC to build debug libraries in the same cmake run as for CMAKE_BUILD_TYPE:
if (DEP_DEBUG AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") if (MSVC AND DEP_DEBUG AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
# MSVC has this nice feature to not be able to link release mode libs to Debug mode # MSVC has this nice feature to not be able to link release mode libs to Debug mode
# projects # projects
@ -243,7 +243,7 @@ if (DEP_DEBUG AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
# Each lib will have a dep_<package>_debug target to build only the debug counterpart # Each lib will have a dep_<package>_debug target to build only the debug counterpart
# Not part of ALL (problem with parallelization) # Not part of ALL (problem with parallelization)
foreach(pkgtgt ${_build_list_dbg}) foreach(pkgtgt ${_build_list_filt})
add_custom_target(${pkgtgt}_debug add_custom_target(${pkgtgt}_debug
COMMAND ${CMAKE_COMMAND} --build . --target ${pkgtgt} COMMAND ${CMAKE_COMMAND} --build . --target ${pkgtgt}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DebugBuild WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DebugBuild