commit 07e80aa6e58d3af851c1c9627b003fd788369b52 parent a88dc9ea88ea5db2abe6389e95261da130bafc90 Author: Vincent Forest <vincent.forest@meso-star.com> Date: Thu, 1 Sep 2016 10:08:22 +0200 Update the Clipper CMake Module Search for the release & debug libraries rather than the debug library only. Diffstat:
| M | cmake/CMakeLists.txt | | | 3 | ++- |
| M | cmake/ClipperConfig.cmake | | | 13 | ++++++++++--- |
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -85,10 +85,11 @@ if(NOT NO_TEST) add_executable(${_name} ${SCPR_SOURCE_DIR}/${_name}.c) target_link_libraries(${_name} scpr RSys ${MATH_LIB}) add_test(${_name} ${_name}) - rcmake_set_test_runtime_dirs(${_name} _runtime_dirs) endfunction() new_test(test_scpr_clip) new_test(test_scpr_mesh) + rcmake_copy_runtime_libraries(test_scpr_clip) + endif() ################################################################################ diff --git a/cmake/ClipperConfig.cmake b/cmake/ClipperConfig.cmake @@ -43,7 +43,10 @@ unset(Clipper_LIBRARY CACHE) unset(Clipper_LIBRARY_DEBUG CACHE) unset(Clipper_LIBRARY_RELWITHDEBINFO CACHE) unset(Clipper_LIBRARY_MINSIZEREL CACHE) -find_library(Clipper_LIBRARY polyclipping DOC "Path to the clipper library.") +find_library(Clipper_LIBRARY polyclipping + DOC "Path to the clipper library used during release builds.") +find_library(Clipper_LIBRARY_DEBUG polyclipping-dbg + DOC "Path to the clipper library used during debug builds.") # Create the imported library target if(CMAKE_HOST_WIN32) @@ -52,11 +55,15 @@ else(CMAKE_HOST_WIN32) set(_property IMPORTED_LOCATION) endif(CMAKE_HOST_WIN32) add_library(Clipper SHARED IMPORTED) -set_target_properties(Clipper PROPERTIES ${_property} ${Clipper_LIBRARY}) +set_target_properties(Clipper PROPERTIES + ${_property} ${Clipper_LIBRARY_DEBUG} + ${_property}_DEBUG ${Clipper_LIBRARY_DEBUG} + ${_property}_RELEASE ${Clipper_LIBRARY}) # Check the package include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Clipper DEFAULT_MSG Clipper_INCLUDE_DIR - Clipper_LIBRARY) + Clipper_LIBRARY + Clipper_LIBRARY_DEBUG)