]> git.cworth.org Git - apitrace/blobdiff - CMakeLists.txt
snapdiff: Remove debugging print statement.
[apitrace] / CMakeLists.txt
index 7308fb24bfee07e446c17ad8e24a59d2e567a617..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 ""
@@ -548,11 +538,11 @@ add_custom_command (
 
 add_custom_command (
     OUTPUT glstate_params.cpp
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glstate.py > ${CMAKE_CURRENT_BINARY_DIR}/glstate_params.cpp
-    DEPENDS glstate.py specs/glparams.py specs/gltypes.py specs/stdapi.py
+    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glstate_params.py > ${CMAKE_CURRENT_BINARY_DIR}/glstate_params.cpp
+    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
@@ -560,15 +550,24 @@ set (retrace_sources
     glretrace_egl.cpp
     glretrace_main.cpp
     glstate.cpp
+    glstate_images.cpp
     glstate_params.cpp
+    glstate_shaders.cpp
     retrace.cpp
     retrace_stdc.cpp
     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
     )
@@ -582,6 +581,7 @@ if (WIN32 OR APPLE OR X11_FOUND)
     )
 
     target_link_libraries (glretrace
+        retrace_common
         common
         ${PNG_LIBRARIES}
         ${ZLIB_LIBRARIES}
@@ -619,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
     )
@@ -630,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}