diff --git a/CMakeLists.txt b/CMakeLists.txt index cdd5f19..d7979a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,9 +51,6 @@ if(CMAKE_COMPILER_IS_GNUCC AND NOT WIN32) ADD_DEFINITIONS(-Wsign-compare) #http://gcc.gnu.org/wiki/Visibility add_definitions(-fvisibility=hidden) -elseif(MSVC14 OR MSVC14) -#pthread-w32 issue, timespec is now part of time.h - ADD_DEFINITIONS(-D_TIMESPEC_DEFINED) endif() ######################################################################## @@ -117,14 +114,6 @@ endif() find_package(CRCFAST) -if(MSVC) - set(THREADS_PTHREADS_LIBRARY "" CACHE STRING "manual pthread-win32 path") - set(THREADS_PTHREADS_INCLUDE_DIR "" CACHE STRING "manual pthread-win32 includepath") -else() - set(THREADS_PTHREADS_LIBRARY "" CACHE INTERNAL "manual pthread-win32 path") - set(THREADS_PTHREADS_INCLUDE_DIR "" CACHE INTERNAL "manual pthread-win32 includepath") -endif() - if(PKG_CONFIG_FOUND AND NOT LIBUSB_FOUND) message(FATAL_ERROR "LibUSB 1.0 required to compile hsdaoh") endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 809645f..078301e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -37,7 +37,7 @@ add_library(hsdaoh SHARED ${HSDAOH_COMMON_SOURCES}) target_link_libraries(hsdaoh ${LIBUSB_LIBRARIES} ${LIBUVC_LIBRARIES} - ${THREADS_PTHREADS_LIBRARY} + ${CMAKE_THREAD_LIBS_INIT} ) if(CRCFAST_FOUND) @@ -52,7 +52,6 @@ target_include_directories(hsdaoh PUBLIC $ # /include ${LIBUSB_INCLUDE_DIRS} ${LIBUVC_INCLUDE_DIRS} - ${THREADS_PTHREADS_INCLUDE_DIR} ) set_target_properties(hsdaoh PROPERTIES DEFINE_SYMBOL "hsdaoh_EXPORTS") set_target_properties(hsdaoh PROPERTIES OUTPUT_NAME hsdaoh) @@ -69,7 +68,7 @@ target_link_libraries(hsdaoh_static m ${LIBUSB_LIBRARIES} ${LIBUVC_LIBRARIES} - ${THREADS_PTHREADS_LIBRARY} + ${CMAKE_THREAD_LIBS_INIT} ) if(CRCFAST_FOUND) @@ -84,7 +83,6 @@ target_include_directories(hsdaoh_static PUBLIC $ # /include ${LIBUSB_INCLUDE_DIRS} ${LIBUVC_INCLUDE_DIRS} - ${THREADS_PTHREADS_INCLUDE_DIR} ) set_property(TARGET hsdaoh_static APPEND PROPERTY COMPILE_DEFINITIONS "hsdaoh_STATIC" ) set_property(TARGET hsdaoh_static PROPERTY POSITION_INDEPENDENT_CODE ON)