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
@@ -3,6 +3,7 @@
######################################################################################
include_directories (${CMAKE_CURRENT_SOURCE_DIR})
+find_package(Threads REQUIRED)
set(CMAKE_C_FLAGS "-Wall")
@@ -45,8 +46,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"
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -110,6 +110,12 @@ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g
add_definitions(-Wall)
+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)
|