cmake: use threads import target (#1000)

This commit is contained in:
Sergiu Deitsch 2023-12-21 20:40:43 +01:00 committed by GitHub
parent d937c2e1b8
commit 65cc31ab16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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}")

View File

@ -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)