diff --git a/CMakeLists.txt b/CMakeLists.txt index f06af13c9..86d12b60f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -376,6 +376,8 @@ option(NOZLIB "Don't use zlib" OFF) # gauss is default now add_definitions( -DUSE_GAUSS ) +find_package( Threads ) + # cannot currently compile static zlib under Windows if (NOT NOZLIB AND NOT ((NOT BUILD_SHARED_LIBS) AND WIN32)) find_package(ZLIB) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0b51e90ec..39cc5b673 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -92,6 +92,7 @@ GENERATE_EXPORT_HEADER(cmsgen target_link_libraries(cmsgen LINK_PUBLIC ${cmsgen_lib_link_libs} LINK_PUBLIC ${CMAKE_THREAD_LIBS_INIT} + ${CMAKE_THREAD_LIBS_INIT} ) if (NOT WIN32)