diff --git a/CMakeLists.txt b/CMakeLists.txt index 1311b9e41..4712a156e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -531,7 +531,9 @@ if (HAVE_DBGHELP) endif (HAVE_DBGHELP) if (HAVE_PTHREAD) - target_link_libraries (glog PRIVATE ${CMAKE_THREAD_LIBS_INIT}) + target_link_libraries (glog PRIVATE Threads::Threads) + + set (Threads_DEPENDENCY "find_dependency (Threads)") if (CMAKE_THREAD_LIBS_INIT) set (glog_libraries_options_for_static_linking "${glog_libraries_options_for_static_linking} ${CMAKE_THREAD_LIBS_INIT}") diff --git a/glog-config.cmake.in b/glog-config.cmake.in index 5c5c9c0da..36e38c4c8 100644 --- a/glog-config.cmake.in +++ b/glog-config.cmake.in @@ -8,6 +8,7 @@ include (CMakeFindDependencyMacro) include (${CMAKE_CURRENT_LIST_DIR}/glog-modules.cmake) @gflags_DEPENDENCY@ +@Threads_DEPENDENCY@ @Unwind_DEPENDENCY@ include (${CMAKE_CURRENT_LIST_DIR}/glog-targets.cmake)