Skip to content

Commit

Permalink
Add missing math lib to fakenect
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
nbourdau authored and zarvox committed Mar 10, 2012
1 parent f8a55dd commit ad42c6f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 19 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ if(BUILD_AUDIO)
add_definitions(-DBUILD_AUDIO)
endif()

if (WIN32)
set(MATH_LIB "")
else(WIN32)
set(MATH_LIB "m")
endif()

######################################################################################
# CMake
######################################################################################
Expand Down
6 changes: 0 additions & 6 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ else()

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

if (WIN32)
set(MATH_LIB "")
else(WIN32)
set(MATH_LIB "m")
endif()

target_link_libraries(glview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
target_link_libraries(regview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
target_link_libraries(hiview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
Expand Down
3 changes: 2 additions & 1 deletion fakenect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ set_target_properties ( fakenect PROPERTIES
VERSION ${PROJECT_VER}
SOVERSION ${PROJECT_APIVER}
OUTPUT_NAME freenect)
target_link_libraries(fakenect ${MATH_LIB})

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

add_executable(record record.c)
target_link_libraries(record freenect m)
target_link_libraries(record freenect)
install (TARGETS record
DESTINATION bin)

Expand Down
6 changes: 0 additions & 6 deletions wrappers/actionscript/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ if(APPLE)
set(CMAKE_EXE_LINKER_FLAGS "-framework CoreFoundation -framework IOKit")
else(APPLE)
find_package(Threads REQUIRED)
if (WIN32)
set(MATH_LIB "")
else(WIN32)
set(MATH_LIB "m")
endif()

endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../wrappers/c_sync)

Expand Down
6 changes: 0 additions & 6 deletions wrappers/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ else()

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

if (WIN32)
set(MATH_LIB "")
else(WIN32)
set(MATH_LIB "m")
endif()

target_link_libraries(cppview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})
endif()

Expand Down

0 comments on commit ad42c6f

Please sign in to comment.