1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
Description: Add the missing libraries
Add missing library to link step of libfreecnect and libfakenect.
Centralize also the definition of MATH_LIB
Origin: vendor
Forwarded: no
Author: Nicolas Bourdaud <nicolas.bourdaud@gmail.com>
Last-Update: 2012-01-26
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -4,6 +4,7 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${LIBUSB_1_INCLUDE_DIRS})
+find_package(Threads REQUIRED)
# Audio Firmware
include(FindPythonInterp)
@@ -36,8 +37,8 @@ ENDIF()
install (TARGETS freenectstatic
DESTINATION "${PROJECT_LIBRARY_INSTALL_DIR}")
-target_link_libraries (freenect ${LIBUSB_1_LIBRARIES})
-target_link_libraries (freenectstatic ${LIBUSB_1_LIBRARIES})
+target_link_libraries(freenect ${LIBUSB_1_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+target_link_libraries(freenectstatic ${LIBUSB_1_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
# Install the header files
install (FILES "../include/libfreenect.h" "../include/libfreenect_registration.h" "../include/libfreenect_audio.h"
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -119,6 +119,12 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} -g")
+if (WIN32)
+ set(MATH_LIB "")
+else(WIN32)
+ set(MATH_LIB "m")
+endif()
+
# Pretty much everyone is going to need the main includes
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include)
|