From e86846f5dc3a60e2abdc51438ebf0ad921a8c91b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sat, 10 Mar 2012 16:02:49 +0000 Subject: [PATCH] Don't assume pthreads is present. --- CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39afc05..df4aed1 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,8 @@ set (CMAKE_USE_PYTHON_VERSION 2.7 2.6) find_package (PythonInterp REQUIRED) find_package (OpenGL REQUIRED) +find_package (Threads) + if (ENABLE_GUI) if (NOT (ENABLE_GUI STREQUAL "AUTO")) set (REQUIRE_GUI REQUIRED) @@ -424,7 +426,7 @@ elseif (APPLE) ) target_link_libraries (cgltrace - pthread + ${CMAKE_THREAD_LIBS_INIT} dl ) @@ -457,7 +459,7 @@ elseif (X11_FOUND) target_link_libraries (glxtrace ${X11_X11_LIB} - pthread + ${CMAKE_THREAD_LIBS_INIT} dl ) @@ -498,7 +500,7 @@ if (EGL_FOUND) ) target_link_libraries (egltrace - pthread + ${CMAKE_THREAD_LIBS_INIT} dl ) @@ -569,7 +571,7 @@ if (WIN32 OR APPLE OR X11_FOUND) # gdb doesn't like when pthreads is loaded through dlopen (which happens # when dlopen'ing libGL), so link pthreads to avoid this issue. See also # http://stackoverflow.com/questions/2702628/gdb-cannot-find-new-threads-generic-error - pthread + ${CMAKE_THREAD_LIBS_INIT} dl ) @@ -601,7 +603,7 @@ if (EGL_FOUND AND X11_FOUND AND NOT WIN32 AND NOT APPLE) target_link_libraries (eglretrace common ${X11_X11_LIB} - pthread + ${CMAKE_THREAD_LIBS_INIT} dl ) -- 2.43.0