From e7269e809ee79d9aad851fa4676738de9a000916 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 17 Jul 2014 15:41:47 -0700 Subject: [PATCH] allow use of debug/release leapmotion library with select_library_configurations --- cmake/modules/FindLeapMotion.cmake | 8 ++++++-- cmake/modules/FindPrioVR.cmake | 2 +- interface/CMakeLists.txt | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/modules/FindLeapMotion.cmake b/cmake/modules/FindLeapMotion.cmake index 40958ece95..2c6a2ae1c0 100644 --- a/cmake/modules/FindLeapMotion.cmake +++ b/cmake/modules/FindLeapMotion.cmake @@ -21,11 +21,15 @@ else (LEAPMOTION_LIBRARIES AND LEAPMOTION_INCLUDE_DIRS) find_path(LEAPMOTION_INCLUDE_DIRS Leap.h PATH_SUFFIXES include HINTS ${LEAPMOTION_SEARCH_DIRS}) if (WIN32) - find_library(LEAPMOTION_LIBRARIES "lib/x86/Leap.lib" HINTS ${LEAPMOTION_SEARCH_DIRS}) + find_library(LEAPMOTION_LIBRARY_DEBUG "lib/x86/Leapd.lib" HINTS ${LEAPMOTION_SEARCH_DIRS}) + find_library(LEAPMOTION_LIBRARY_RELEASE "lib/x86/Leap.lib" HINTS ${LEAPMOTION_SEARCH_DIRS}) endif (WIN32) if (APPLE) - find_library(LEAPMOTION_LIBRARIES "lib/libLeap.dylib" HINTS ${LEAPMOTION_SEARCH_DIRS}) + find_library(LEAPMOTION_LIBRARY_RELEASE "lib/libLeap.dylib" HINTS ${LEAPMOTION_SEARCH_DIRS}) endif (APPLE) + + include(SelectLibraryConfigurations) + select_library_configurations(LEAPMOTION) if (LEAPMOTION_INCLUDE_DIRS AND LEAPMOTION_LIBRARIES) set(LEAPMOTION_FOUND TRUE) diff --git a/cmake/modules/FindPrioVR.cmake b/cmake/modules/FindPrioVR.cmake index 6e78045321..46710d8b5e 100644 --- a/cmake/modules/FindPrioVR.cmake +++ b/cmake/modules/FindPrioVR.cmake @@ -1,4 +1,4 @@ -# Try to find the PrioVT library +# Try to find the PrioVR library # # You must provide a PRIOVR_ROOT_DIR which contains lib and include directories # diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 2d48d57410..564923b53d 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -206,7 +206,7 @@ if (LEAPMOTION_FOUND AND NOT DISABLE_LEAPMOTION) if (APPLE OR UNIX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${LEAPMOTION_INCLUDE_DIRS}") endif () - target_link_libraries(${TARGET_NAME} "${LEAPMOTION_LIBRARIES}") + target_link_libraries(${TARGET_NAME} ${LEAPMOTION_LIBRARIES}) endif (LEAPMOTION_FOUND AND NOT DISABLE_LEAPMOTION) # and with SDL for joysticks