]> git.cworth.org Git - apitrace/commitdiff
Link against X11 libraries.
authorZack Rusin <zack@kde.org>
Sun, 10 Apr 2011 10:13:26 +0000 (11:13 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 10 Apr 2011 10:13:26 +0000 (11:13 +0100)
CMakeLists.txt

index 506325e0a8956ffb5d1388252f3ae0b6986ab900..8fb356e9aaf60c75cf97141fb1cec25f7ae2e443 100644 (file)
@@ -24,6 +24,7 @@ if (NOT WIN32)
     # to deploy the wrappers DLLs
     find_package (ZLIB)
     find_package (PNG)
+    find_package (X11 REQUIRED)
 else (NOT WIN32)
     find_package (DirectX)
 endif (NOT WIN32)
@@ -177,6 +178,7 @@ if (WIN32)
     endif (MINGW)
 
 else ()
+    include_directories (${X11_INCLUDE_DIR})
 
     # libGL.so
     add_custom_command (
@@ -237,8 +239,13 @@ target_link_libraries (glretrace
     trace
     ${OPENGL_gl_LIBRARY}
     ${OPENGL_glu_LIBRARY}
+    ${X11_LIBRARIES}
 )
 
+if (NOT WIN32)
+    target_link_libraries (glretrace ${X11_LIBRARIES})
+endif (NOT WIN32)
+
 if (QT4_FOUND AND QJSON_FOUND)
     add_subdirectory(gui)
 endif (QT4_FOUND AND QJSON_FOUND)