From 29ed15d3acaf8c778ea6aff41a636892e362f7a3 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 2 May 2012 22:00:45 -0700 Subject: gruel: conditional linking for pthread --- gruel/src/lib/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gruel/src') diff --git a/gruel/src/lib/CMakeLists.txt b/gruel/src/lib/CMakeLists.txt index 2a96163ce..e7713536c 100644 --- a/gruel/src/lib/CMakeLists.txt +++ b/gruel/src/lib/CMakeLists.txt @@ -80,8 +80,14 @@ list(APPEND gruel_sources thread_group.cc ) +list(APPEND gruel_libs ${Boost_LIBRARIES}) + +if(HAVE_PTHREAD_SETSCHEDPARAM) + list(APPEND gruel_libs pthread) +endif() + add_library(gruel SHARED ${gruel_sources}) -target_link_libraries(gruel ${Boost_LIBRARIES} -lpthread) +target_link_libraries(gruel ${gruel_libs}) GR_LIBRARY_FOO(gruel RUNTIME_COMPONENT "gruel_runtime" DEVEL_COMPONENT "gruel_devel") ######################################################################## -- cgit