From: José Fonseca Date: Thu, 8 Dec 2011 19:56:16 +0000 (+0000) Subject: cmake: Link (e)glretrace against dl. X-Git-Url: https://git.cworth.org/git?p=apitrace;a=commitdiff_plain;h=dfa23ba3320555bb32ee964e20f83d498132bcb7 cmake: Link (e)glretrace against dl. We depend on it now. Should fix link failure due to missing dlsym() symbols. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 67507e2..09386aa 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -550,10 +550,13 @@ else () target_link_libraries (glretrace ${X11_X11_LIB}) endif () - # 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 - target_link_libraries (glretrace pthread) + target_link_libraries (glretrace + # 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 + dl + ) endif () install (TARGETS glretrace RUNTIME DESTINATION bin) @@ -578,6 +581,7 @@ if (EGL_FOUND AND NOT WIN32 AND NOT APPLE) common ${X11_X11_LIB} pthread + dl ) install (TARGETS eglretrace RUNTIME DESTINATION bin)