]> git.cworth.org Git - apitrace/blobdiff - CMakeLists.txt
snapdiff: Remove debugging print statement.
[apitrace] / CMakeLists.txt
index d42aa1e05900e5701372cefd68bbd1b2b50918da..d6ea62b97f8c506f73e774692c76c0a24c3daf58 100755 (executable)
@@ -60,10 +60,6 @@ else ()
         include_directories (${X11_INCLUDE_DIR})
         add_definitions (-DHAVE_X11)
     endif ()
-
-    if (ENABLE_EGL)
-        add_definitions (-DHAVE_EGL)
-    endif ()
 endif ()
 
 
@@ -380,7 +376,7 @@ if (WIN32)
         add_custom_command (
             OUTPUT d3d10trace.cpp
             COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d10trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d10trace.cpp
-            DEPENDS d3d10trace.py trace.py specs/d3d10misc.py specs/d3d10.py specs/dxgi.py specs/dxgitype.py specs/dxgiformat.py specs/winapi.py specs/stdapi.py
+            DEPENDS d3d10trace.py trace.py specs/d3d10misc.py specs/d3d10.py specs/d3d10sdklayers.py specs/dxgi.py specs/dxgitype.py specs/dxgiformat.py specs/winapi.py specs/stdapi.py
         )
         add_library (d3d10 MODULE specs/d3d10.def d3d10trace.cpp)
         target_link_libraries (d3d10
@@ -510,12 +506,6 @@ if (ENABLE_EGL AND NOT WIN32 AND NOT APPLE)
 
     add_dependencies (egltrace glproc)
 
-    set_property (
-        TARGET egltrace
-        APPEND
-        PROPERTY COMPILE_DEFINITIONS "TRACE_EGL"
-    )
-
     set_target_properties (egltrace PROPERTIES
         # avoid the default "lib" prefix
         PREFIX ""
@@ -552,7 +542,7 @@ add_custom_command (
     DEPENDS glstate_params.py specs/glparams.py specs/gltypes.py specs/stdapi.py
 )
 
-set (retrace_sources
+add_library (retrace_common
     glretrace_gl.cpp
     glretrace_cgl.cpp
     glretrace_glx.cpp
@@ -568,9 +558,16 @@ set (retrace_sources
     glws.cpp
 )
 
+add_dependencies (retrace_common glproc)
+
+set_property (
+    TARGET retrace_common
+    APPEND
+    PROPERTY COMPILE_DEFINITIONS "RETRACE"
+)
+
 if (WIN32 OR APPLE OR X11_FOUND)
     add_executable (glretrace
-        ${retrace_sources}
         ${glws_os}
         glproc_gl.cpp
     )
@@ -584,6 +581,7 @@ if (WIN32 OR APPLE OR X11_FOUND)
     )
 
     target_link_libraries (glretrace
+        retrace_common
         common
         ${PNG_LIBRARIES}
         ${ZLIB_LIBRARIES}
@@ -621,7 +619,6 @@ endif ()
 
 if (ENABLE_EGL AND X11_FOUND AND NOT WIN32 AND NOT APPLE)
     add_executable (eglretrace
-        ${retrace_sources}
         glws_egl_xlib.cpp
         glproc_egl.cpp
     )
@@ -632,10 +629,10 @@ if (ENABLE_EGL AND X11_FOUND AND NOT WIN32 AND NOT APPLE)
         TARGET eglretrace
         APPEND
         PROPERTY COMPILE_DEFINITIONS "RETRACE"
-        PROPERTY COMPILE_DEFINITIONS "TRACE_EGL"
     )
 
     target_link_libraries (eglretrace
+        retrace_common
         common
         ${PNG_LIBRARIES}
         ${ZLIB_LIBRARIES}