diff --git a/CMakeLists.txt b/CMakeLists.txt index e4d2a9a0a2..66239595ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -310,6 +310,8 @@ endmacro() # Simply to improve readability of the main script. #----------------------------------------------------------------------- macro (CMAKE_BUILD_UTILITIES) + find_package(Threads) + #--------------------------------------------------------------------- # Create the kwsys library for CMake. set(KWSYS_NAMESPACE cmsys) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index e7c0732675..a0010a292b 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -765,6 +765,7 @@ target_link_libraries(CMakeLib cmsys ${CMAKE_LIBUV_LIBRARIES} ${CMAKE_LIBRHASH_LIBRARIES} ${CMake_KWIML_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} ) if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc")