Skip to content

Commit 34c01c1

Browse files
committed
CMake: use Threads::Threads instead of CMAKE_THREAD_LIBS_INIT
Using the more modern imported target does not require a more recent CMake.
1 parent 05a4c63 commit 34c01c1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ add_library(graphqlservice
4141
Introspection.cpp
4242
${CMAKE_BINARY_DIR}/graphqlservice/IntrospectionSchema.cpp)
4343
target_link_libraries(graphqlservice PRIVATE taocpp::pegtl)
44-
target_link_libraries(graphqlservice PUBLIC ${CMAKE_THREAD_LIBS_INIT})
44+
target_link_libraries(graphqlservice PUBLIC Threads::Threads)
4545
target_include_directories(graphqlservice
4646
PUBLIC
4747
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>

cmake/cppgraphqlgen-config.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ The following import targets are created
1515

1616
include(CMakeFindDependencyMacro)
1717
find_package(pegtl REQUIRED)
18+
find_package(Threads REQUIRED)
1819
include("${CMAKE_CURRENT_LIST_DIR}/cppgraphqlgen-targets.cmake")

0 commit comments

Comments
 (0)