From 14d87ed94732467d61d00d9c4426940301f531e8 Mon Sep 17 00:00:00 2001 From: flaviojs Date: Sun, 3 Jun 2012 19:31:32 +0000 Subject: [PATCH] CMake: Add threads library. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16223 54d463be-8e91-2dee-dedb-b68131a5f0ec --- CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a99cee85ed..120ce4f358 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,6 +138,19 @@ if( Subversion_FOUND AND SVNVERSION ) endif() +# +# threads +# +message( STATUS "Detecting threads library" ) +set( CMAKE_THREAD_PREFER_PTHREAD 1 ) +find_package(Threads REQUIRED) +if( CMAKE_THREAD_LIBS_INIT ) + message( STATUS "Adding global library: ${FUNCTION_FLOOR_LIBRARIES}" ) + set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ) +endif() +message( STATUS "Detecting threads library - done" ) + + # # math library (FreeBSD/Linux/Solaris) #