From d32c6d8d4022ebe4b96ef0bcd3d2747909a64f25 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Tue, 7 Sep 2021 12:09:02 +0900 Subject: [PATCH] Fix CMakeLists.txt to use FindThreads --- src/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 186d0da..6b2976c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,8 +21,10 @@ set(EntityComponentSystem_HEADERS set(WillFailCompile_SOURCES test/WillFailCompileTest.cpp) +find_package(Threads REQUIRED) + add_library(EntityComponentSystem INTERFACE) -target_link_libraries(EntityComponentSystem INTERFACE pthread) +target_link_libraries(EntityComponentSystem INTERFACE ${CMAKE_THREAD_LIBS_INIT}) target_include_directories(EntityComponentSystem INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})