Skip to content

Commit f8a55dd

Browse files
nbourdauzarvox
authored andcommitted
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>
1 parent 05bca9f commit f8a55dd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

wrappers/c_sync/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
######################################################################################
44
if (WIN32)
55
set_source_files_properties(libfreenect_sync.c PROPERTIES LANGUAGE CXX)
6-
76
set(THREADS_USE_PTHREADS_WIN32 true)
8-
find_package(Threads REQUIRED)
9-
include_directories(${THREADS_PTHREADS_INCLUDE_DIR})
107
endif()
118

9+
find_package(Threads REQUIRED)
10+
include_directories(${THREADS_PTHREADS_INCLUDE_DIR})
11+
1212
add_library (freenect_sync SHARED libfreenect_sync.c)
1313
add_library (freenect_sync_static STATIC libfreenect_sync.c)
1414
set_target_properties (freenect_sync_static PROPERTIES OUTPUT_NAME freenect_sync)
@@ -25,4 +25,5 @@ install (TARGETS freenect_sync
2525
install (TARGETS freenect_sync_static
2626
DESTINATION "${PROJECT_LIBRARY_INSTALL_DIR}")
2727
install (FILES "libfreenect_sync.h"
28-
DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
28+
DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
29+

0 commit comments

Comments
 (0)