Permalink
Browse files

Search for threading lib on any platform in c_sync

Threading library is necessary for all platform when compiling c_sync
wrapper. Moving the search fix the missing library on Linux.

Signed-off-by: Nicolas Bourdaud <nicolas.bourdaud@gmail.com>
  • Loading branch information...
1 parent 05bca9f commit f8a55ddcfca7a9a03b3adbc0ded4707232113874 @nbourdau nbourdau committed with zarvox Feb 22, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 wrappers/c_sync/CMakeLists.txt
View
9 wrappers/c_sync/CMakeLists.txt
@@ -3,12 +3,12 @@
######################################################################################
if (WIN32)
set_source_files_properties(libfreenect_sync.c PROPERTIES LANGUAGE CXX)
-
set(THREADS_USE_PTHREADS_WIN32 true)
- find_package(Threads REQUIRED)
- include_directories(${THREADS_PTHREADS_INCLUDE_DIR})
endif()
+find_package(Threads REQUIRED)
+include_directories(${THREADS_PTHREADS_INCLUDE_DIR})
+
add_library (freenect_sync SHARED libfreenect_sync.c)
add_library (freenect_sync_static STATIC libfreenect_sync.c)
set_target_properties (freenect_sync_static PROPERTIES OUTPUT_NAME freenect_sync)
@@ -25,4 +25,5 @@ install (TARGETS freenect_sync
install (TARGETS freenect_sync_static
DESTINATION "${PROJECT_LIBRARY_INSTALL_DIR}")
install (FILES "libfreenect_sync.h"
- DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
+ DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
+

0 comments on commit f8a55dd

Please sign in to comment.