Skip to content

Commit ad42c6f

Browse files
nbourdauzarvox
authored andcommitted
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 <[email protected]>
1 parent f8a55dd commit ad42c6f

File tree

5 files changed

+8
-19
lines changed

5 files changed

+8
-19
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ if(BUILD_AUDIO)
8686
add_definitions(-DBUILD_AUDIO)
8787
endif()
8888

89+
if (WIN32)
90+
set(MATH_LIB "")
91+
else(WIN32)
92+
set(MATH_LIB "m")
93+
endif()
94+
8995
######################################################################################
9096
# CMake
9197
######################################################################################

examples/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ else()
5858

5959
include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${USB_INCLUDE_DIRS})
6060

61-
if (WIN32)
62-
set(MATH_LIB "")
63-
else(WIN32)
64-
set(MATH_LIB "m")
65-
endif()
66-
6761
target_link_libraries(glview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
6862
target_link_libraries(regview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
6963
target_link_libraries(hiview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})

fakenect/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ set_target_properties ( fakenect PROPERTIES
88
VERSION ${PROJECT_VER}
99
SOVERSION ${PROJECT_APIVER}
1010
OUTPUT_NAME freenect)
11+
target_link_libraries(fakenect ${MATH_LIB})
1112

1213
install (TARGETS fakenect
1314
DESTINATION "${PROJECT_LIBRARY_INSTALL_DIR}/fakenect")
1415

1516
add_executable(record record.c)
16-
target_link_libraries(record freenect m)
17+
target_link_libraries(record freenect)
1718
install (TARGETS record
1819
DESTINATION bin)
1920

wrappers/actionscript/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ if(APPLE)
2525
set(CMAKE_EXE_LINKER_FLAGS "-framework CoreFoundation -framework IOKit")
2626
else(APPLE)
2727
find_package(Threads REQUIRED)
28-
if (WIN32)
29-
set(MATH_LIB "")
30-
else(WIN32)
31-
set(MATH_LIB "m")
32-
endif()
33-
3428
endif()
3529
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../wrappers/c_sync)
3630

wrappers/cpp/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ else()
2727

2828
include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${USB_INCLUDE_DIRS})
2929

30-
if (WIN32)
31-
set(MATH_LIB "")
32-
else(WIN32)
33-
set(MATH_LIB "m")
34-
endif()
35-
3630
target_link_libraries(cppview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
3731
endif()
3832

0 commit comments

Comments
 (0)