4 message(FATAL_ERROR "Include Defs.cmake")
19 win32/deSemaphoreWin32.c
21 win32/deThreadLocalWin32.c
23 unix/deNamedSemaphoreUnix.c
24 unix/deSemaphoreUnix.c
26 unix/deThreadLocalUnix.c
37 ${CMAKE_CURRENT_SOURCE_DIR}
41 add_definitions(-D_GNU_SOURCE)
42 set(DETHREAD_LIBS ${DETHREAD_LIBS} pthread)
45 if (DE_OS_IS_ANDROID OR DE_OS_IS_OSX OR DE_OS_IS_IOS OR DE_OS_IS_QNX)
46 add_definitions(-D_XOPEN_SOURCE=600)
49 add_library(dethread STATIC ${DETHREAD_SRCS})
50 target_link_libraries(dethread ${DETHREAD_LIBS})
52 set(DETHREAD_STANDALONE_TEST ON CACHE STRING "Build standalone binary for testing dethread.")
54 if (DETHREAD_STANDALONE_TEST AND (DE_OS_IS_WIN32 OR DE_OS_IS_UNIX OR DE_OS_IS_OSX))
55 add_executable(dethread_test standalone_test.c)
56 target_link_libraries(dethread_test dethread debase)