configurable pthread

pull/7/head
Jeff Becker 6 years ago
parent d6f8fd0f60
commit 3a3fdd10e8

@ -26,7 +26,11 @@ endif()
include(CheckIncludeFileCXX)
CHECK_INCLUDE_FILE_CXX(filesystem.h HAVE_STD_FS)
if(ANDROID)
set(THREAD_LIB "-pthread")
else()
set(THREAD_LIB pthread)
endif()
if(STATIC_LINK)
set(STATIC_LINK_LIBS c)
@ -357,11 +361,11 @@ else()
endif(MINGW)
endif(COMPILER_SUPPORTS_CXX11 AND NOT COMPILER_SUPPORTS_CXX17 OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" OR NOT HAVE_STD_FS)
if (MINGW)
target_link_libraries(dns ${STATIC_LIB} llarpplatform-static pthread ws2_32 stdc++fs)
target_link_libraries(dns ${STATIC_LIB} llarpplatform-static ${THREAD_LIB} ws2_32 stdc++fs)
elseif(WIN32)
target_link_libraries(dns ${STATIC_LIB} llarpplatform-static pthread ws2_32)
target_link_libraries(dns ${STATIC_LIB} llarpplatform-static ${THREAD_LIB} ws2_32)
endif(MINGW)
target_link_libraries(dns ${STATIC_LIB} llarpplatform-static pthread)
target_link_libraries(dns ${STATIC_LIB} llarpplatform-static ${THREAD_LIB})
endif(NOT WITH_SHARED)
endif(WITH_STATIC)
@ -396,7 +400,7 @@ else()
target_link_libraries(${CLIENT_EXE} ${SHARED_LIB} llarpplatform)
target_link_libraries(rcutil ${SHARED_LIB} llarpplatform)
endif(COMPILER_SUPPORTS_CXX11 AND NOT COMPILER_SUPPORTS_CXX17 OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" OR NOT HAVE_STD_FS)
target_link_libraries(dns ${SHARED_LIB} llarpplatform pthread)
target_link_libraries(dns ${SHARED_LIB} llarpplatform ${THREAD_LIB})
endif(NOT WITH_STATIC)
endif(WITH_SHARED)
endif(SHADOW)

Loading…
Cancel
Save