From fb1f8082d2191b0194f856016870f5a974e805bc Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 15 Jul 2012 21:27:57 +0200 Subject: [PATCH] fix link error with recent glibc versions --- components/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 284ca3cce..efeb69cae 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -72,5 +72,11 @@ add_library(components STATIC ${COMPONENT_FILES}) target_link_libraries(components ${Boost_LIBRARIES} ${OGRE_LIBRARIES}) +# Fix for not visible pthreads functions for linker with glibc 2.15 +if (UNIX AND NOT APPLE) +target_link_libraries(components ${CMAKE_THREAD_LIBS_INIT}) +endif() + + # Make the variable accessible for other subdirectories set(COMPONENT_FILES ${COMPONENT_FILES} PARENT_SCOPE)