+
+ if (WIN32)
+ else ()
+ if (APPLE)
+ target_link_libraries (glretrace
+ "-framework Cocoa"
+ "-framework ApplicationServices" # CGS*
+ #"-framework OpenGL" # CGL*
+ )
+ else ()
+ target_link_libraries (glretrace ${X11_X11_LIB})
+ endif ()
+
+ 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
+ ${CMAKE_THREAD_LIBS_INIT}
+ dl
+ )
+
+ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ target_link_libraries (glretrace rt)
+ endif ()
+
+ endif ()
+
+ install (TARGETS glretrace RUNTIME DESTINATION bin)