From 774777b1cdefb7766611c38ac94ab469d772db5f Mon Sep 17 00:00:00 2001 From: flaviojs Date: Sun, 3 Jun 2012 19:31:32 +0000 Subject: CMake: Add threads library. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16223 54d463be-8e91-2dee-dedb-b68131a5f0ec --- CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a99cee85e..120ce4f35 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) # -- cgit v1.2.3-60-g2f50