Skip to content
This repository
Browse code

Add missing math lib to fakenect

Fix the missing dependency of fakenect on the math lib and remove the
unecessary one of record. On the way centralizes definition of MATH_LIB
since several wrappers and examples uses it.

Signed-off-by: Nicolas Bourdaud <nicolas.bourdaud@gmail.com>
  • Loading branch information...
commit ad42c6f1f96cb5561a5ca0baec47536d58a006ab 1 parent f8a55dd
Nicolas Bourdaud nbourdau authored zarvox committed
6 CMakeLists.txt
@@ -86,6 +86,12 @@ if(BUILD_AUDIO)
86 86 add_definitions(-DBUILD_AUDIO)
87 87 endif()
88 88
  89 +if (WIN32)
  90 + set(MATH_LIB "")
  91 +else(WIN32)
  92 + set(MATH_LIB "m")
  93 +endif()
  94 +
89 95 ######################################################################################
90 96 # CMake
91 97 ######################################################################################
6 examples/CMakeLists.txt
@@ -58,12 +58,6 @@ else()
58 58
59 59 include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${USB_INCLUDE_DIRS})
60 60
61   - if (WIN32)
62   - set(MATH_LIB "")
63   - else(WIN32)
64   - set(MATH_LIB "m")
65   - endif()
66   -
67 61 target_link_libraries(glview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
68 62 target_link_libraries(regview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
69 63 target_link_libraries(hiview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
3  fakenect/CMakeLists.txt
@@ -8,12 +8,13 @@ set_target_properties ( fakenect PROPERTIES
8 8 VERSION ${PROJECT_VER}
9 9 SOVERSION ${PROJECT_APIVER}
10 10 OUTPUT_NAME freenect)
  11 +target_link_libraries(fakenect ${MATH_LIB})
11 12
12 13 install (TARGETS fakenect
13 14 DESTINATION "${PROJECT_LIBRARY_INSTALL_DIR}/fakenect")
14 15
15 16 add_executable(record record.c)
16   -target_link_libraries(record freenect m)
  17 +target_link_libraries(record freenect)
17 18 install (TARGETS record
18 19 DESTINATION bin)
19 20
6 wrappers/actionscript/CMakeLists.txt
@@ -25,12 +25,6 @@ if(APPLE)
25 25 set(CMAKE_EXE_LINKER_FLAGS "-framework CoreFoundation -framework IOKit")
26 26 else(APPLE)
27 27 find_package(Threads REQUIRED)
28   - if (WIN32)
29   - set(MATH_LIB "")
30   - else(WIN32)
31   - set(MATH_LIB "m")
32   - endif()
33   -
34 28 endif()
35 29 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../wrappers/c_sync)
36 30
6 wrappers/cpp/CMakeLists.txt
@@ -27,12 +27,6 @@ else()
27 27
28 28 include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${USB_INCLUDE_DIRS})
29 29
30   - if (WIN32)
31   - set(MATH_LIB "")
32   - else(WIN32)
33   - set(MATH_LIB "m")
34   - endif()
35   -
36 30 target_link_libraries(cppview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
37 31 endif()
38 32

0 comments on commit ad42c6f

Please sign in to comment.
Something went wrong with that request. Please try again.