]> git.cworth.org Git - apitrace/commitdiff
cmake: Link (e)glretrace against dl.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Thu, 8 Dec 2011 19:56:16 +0000 (19:56 +0000)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Thu, 8 Dec 2011 19:56:16 +0000 (19:56 +0000)
We depend on it now.

Should fix link failure due to missing dlsym() symbols.

CMakeLists.txt

index 67507e2255e0c67c43553027e65e00c325c915c7..09386aa2a6a699c2f25572b9502e9258aeb0b2ce 100755 (executable)
@@ -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)