]> git.cworth.org Git - apitrace/blobdiff - wrappers/CMakeLists.txt
Disassemble D3D10.1 shaders too.
[apitrace] / wrappers / CMakeLists.txt
index b9e3eefe88314146f5dfc9e6f219c36677d954df..bd2d2e82802fa385c6c639a230bc41c2a9427591 100644 (file)
@@ -9,6 +9,14 @@ include_directories (
     ${CMAKE_SOURCE_DIR}/dispatch
 )
 
+add_library (common_trace STATIC
+    trace.cpp
+)
+
+set_target_properties (common_trace PROPERTIES
+    # Ensure it can be statically linked in shared libraries
+    COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}"
+)
 
 if (WIN32)
     if (MINGW)
@@ -36,6 +44,7 @@ if (WIN32)
         )
         add_library (ddrawtrace MODULE ddraw.def ddrawtrace.cpp)
         target_link_libraries (ddrawtrace
+            common_trace
             common
             ${ZLIB_LIBRARIES}
             ${SNAPPY_LIBRARIES}
@@ -66,6 +75,7 @@ if (WIN32)
         )
         add_library (d3d8trace MODULE d3d8.def d3d8trace.cpp d3d9shader.cpp)
         target_link_libraries (d3d8trace
+            common_trace
             common
             ${ZLIB_LIBRARIES}
             ${SNAPPY_LIBRARIES}
@@ -96,6 +106,7 @@ if (WIN32)
         )
         add_library (d3d9trace MODULE d3d9.def d3d9trace.cpp d3d9shader.cpp)
         target_link_libraries (d3d9trace
+            common_trace
             common
             ${ZLIB_LIBRARIES}
             ${SNAPPY_LIBRARIES}
@@ -115,6 +126,7 @@ if (WIN32)
             COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d10trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d10trace.cpp
             DEPENDS
                 d3d10trace.py
+                d3dcommontrace.py
                 dlltrace.py
                 trace.py
                 ${CMAKE_SOURCE_DIR}/dispatch/dispatch.py
@@ -132,6 +144,7 @@ if (WIN32)
         )
         add_library (d3d10trace MODULE d3d10.def d3d10trace.cpp d3d10shader.cpp)
         target_link_libraries (d3d10trace
+            common_trace
             common
             ${ZLIB_LIBRARIES}
             ${SNAPPY_LIBRARIES}
@@ -151,6 +164,7 @@ if (WIN32)
             COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d10_1trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d10_1trace.cpp
             DEPENDS
                 d3d10_1trace.py
+                d3dcommontrace.py
                 dlltrace.py
                 trace.py
                 ${CMAKE_SOURCE_DIR}/dispatch/dispatch.py
@@ -164,8 +178,9 @@ if (WIN32)
                 ${CMAKE_SOURCE_DIR}/specs/winapi.py
                 ${CMAKE_SOURCE_DIR}/specs/stdapi.py
         )
-        add_library (d3d10_1trace MODULE d3d10_1.def d3d10_1trace.cpp)
+        add_library (d3d10_1trace MODULE d3d10_1.def d3d10_1trace.cpp d3d10shader.cpp)
         target_link_libraries (d3d10_1trace
+            common_trace
             common
             ${ZLIB_LIBRARIES}
             ${SNAPPY_LIBRARIES}
@@ -205,6 +220,7 @@ if (WIN32)
         )
         add_library (d3d11trace MODULE d3d11.def d3d11trace.cpp)
         target_link_libraries (d3d11trace
+            common_trace
             common
             ${ZLIB_LIBRARIES}
             ${SNAPPY_LIBRARIES}
@@ -241,6 +257,7 @@ if (WIN32)
     add_dependencies (wgltrace glproc)
     target_link_libraries (wgltrace
         glproc_gl
+        common_trace
         common
         ${ZLIB_LIBRARIES}
         ${SNAPPY_LIBRARIES}
@@ -284,6 +301,7 @@ elseif (APPLE)
 
     target_link_libraries (cgltrace
         glproc_gl
+        common_trace
         common
         ${ZLIB_LIBRARIES}
         ${SNAPPY_LIBRARIES}
@@ -326,10 +344,10 @@ elseif (X11_FOUND)
 
     target_link_libraries (glxtrace
         glproc_gl
+        common_trace
         common
         ${ZLIB_LIBRARIES}
         ${SNAPPY_LIBRARIES}
-        ${X11_X11_LIB}
         ${CMAKE_THREAD_LIBS_INIT}
         dl
     )
@@ -359,6 +377,7 @@ if (ENABLE_EGL AND NOT WIN32 AND NOT APPLE)
         egltrace.cpp
         glcaps.cpp
         gltrace_state.cpp
+        ${CMAKE_SOURCE_DIR}/helpers/eglsize.cpp
     )
 
     add_dependencies (egltrace glproc)
@@ -373,6 +392,7 @@ if (ENABLE_EGL AND NOT WIN32 AND NOT APPLE)
 
     target_link_libraries (egltrace
         glproc_egl
+        common_trace
         common
         ${ZLIB_LIBRARIES}
         ${SNAPPY_LIBRARIES}