X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=src%2Fvoglcore%2FCMakeLists.txt;h=476cb3a241e2e3aa19d2ff5c6d44016685640742;hb=52a7a2debe9a884acca7d594859c9e113f0f475e;hp=9dd0f5067048bb910df5bde3445f931b89520f44;hpb=8718f75fe1ab2bdbb208a6471499063be903dddb;p=vogl diff --git a/src/voglcore/CMakeLists.txt b/src/voglcore/CMakeLists.txt index 9dd0f50..476cb3a 100644 --- a/src/voglcore/CMakeLists.txt +++ b/src/voglcore/CMakeLists.txt @@ -2,6 +2,10 @@ project(voglcore) cmake_minimum_required(VERSION 2.8) option(VOGL_ENABLE_ASSERTS "Enable assertions in all builds (including release)" FALSE) +find_package(Threads) +if (NOT CMAKE_USE_PTHREADS_INIT) + message(ERROR "pthread not found") +endif () include("${SRC_DIR}/build_options.cmake") @@ -105,7 +109,10 @@ else() endif() add_library(${PROJECT_NAME} ${SRC_LIST}) -target_link_libraries(${PROJECT_NAME} rt) +target_link_libraries(${PROJECT_NAME} + ${CMAKE_THREAD_LIBS_INIT} + rt + ) build_options_finalize()