summaryrefslogtreecommitdiff
path: root/gruel
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-05-02 22:00:45 -0700
committerJosh Blum <josh@joshknows.com>2012-05-02 22:00:45 -0700
commit29ed15d3acaf8c778ea6aff41a636892e362f7a3 (patch)
tree1d252f3b68976f956a92e11f2f296978b61c3cb3 /gruel
parent9bab2daba836ad6c121b5237af287efb7dc5968e (diff)
gruel: conditional linking for pthread
Diffstat (limited to 'gruel')
-rw-r--r--gruel/src/lib/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/gruel/src/lib/CMakeLists.txt b/gruel/src/lib/CMakeLists.txt
index 2a96163ce1..e7713536ce 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")
########################################################################