Skip to content

Commit

Permalink
cmake: use threads import target
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiud committed Dec 21, 2023
1 parent d937c2e commit 02e668d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
1 change: 1 addition & 0 deletions glog-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 02e668d

Please sign in to comment.