]> git.cworth.org Git - apitrace/blobdiff - retrace/CMakeLists.txt
Use skiplist-based FastCallSet within trace::CallSet
[apitrace] / retrace / CMakeLists.txt
index 2e33b547b7a1ecddfd83014544aed32fb32fb807..913c23e1d201a43c0484a1eee188de1165a905d5 100644 (file)
@@ -6,6 +6,7 @@ include_directories (
     ${CMAKE_SOURCE_DIR}/helpers
     ${CMAKE_BINARY_DIR}/dispatch
     ${CMAKE_SOURCE_DIR}/dispatch
+    ${CMAKE_SOURCE_DIR}/image
 )
 
 add_definitions (-DRETRACE)
@@ -31,22 +32,22 @@ add_custom_command (
                 ${CMAKE_SOURCE_DIR}/specs/stdapi.py
 )
 
-add_library (retrace_common
+add_library (retrace_common STATIC
     retrace.cpp
     retrace_main.cpp
     retrace_stdc.cpp
     retrace_swizzle.cpp
+    json.cpp
 )
-
 target_link_libraries (retrace_common
+    image
     common
-    ${PNG_LIBRARIES}
     ${ZLIB_LIBRARIES}
     ${SNAPPY_LIBRARIES}
     ${GETOPT_LIBRARIES}
 )
 
-add_library (glretrace_common
+add_library (glretrace_common STATIC
     glretrace_gl.cpp
     glretrace_cgl.cpp
     glretrace_glx.cpp
@@ -60,8 +61,10 @@ add_library (glretrace_common
     glstate_shaders.cpp
     glws.cpp
 )
-
 add_dependencies (glretrace_common glproc)
+target_link_libraries (glretrace_common
+    retrace_common
+)
 
 
 if (WIN32 OR APPLE OR X11_FOUND)
@@ -99,6 +102,9 @@ if (WIN32 OR APPLE OR X11_FOUND)
 
         if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
             target_link_libraries (glretrace rt)
+            if (READPROC_H_FOUND)
+                target_link_libraries (glretrace ${proc_LIBRARY})
+            endif ()
         endif ()
 
     endif ()
@@ -124,6 +130,9 @@ if (ENABLE_EGL AND X11_FOUND AND NOT WIN32 AND NOT APPLE)
 
     if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
         target_link_libraries (eglretrace rt)
+        if (READPROC_H_FOUND)
+            target_link_libraries (eglretrace ${proc_LIBRARY})
+        endif ()
     endif ()
 
     install (TARGETS eglretrace RUNTIME DESTINATION bin) 
@@ -133,6 +142,10 @@ if (WIN32)
     if (DirectX_D3D8_INCLUDE_DIR) 
         include_directories (BEFORE SYSTEM ${DirectX_D3D8_INCLUDE_DIR})
         set (HAVE_D3D8 1)
+        set (D3DSTATE_SOURCES ${D3DSTATE_SOURCES}
+            d3d8state.cpp
+            d3d8state_images.cpp
+        )
     else ()
         set (HAVE_D3D8 0)
     endif ()
@@ -180,13 +193,17 @@ if (WIN32)
             set (DXGI_MODULES ${DXGI_MODULES} d3d10_1)
         endif ()
         set (D3DSTATE_SOURCES ${D3DSTATE_SOURCES}
+            dxgistate.cpp
             d3d10state.cpp
             d3d10state_images.cpp
         )
     endif ()
 
     if (DirectX_D3D11_INCLUDE_DIR)
-        include_directories (BEFORE SYSTEM ${DirectX_D3D11_INCLUDE_DIR})
+        include_directories (BEFORE SYSTEM
+            ${DirectX_D3D11_INCLUDE_DIR}
+            ${CMAKE_SOURCE_DIR}/thirdparty/directxtex/DirectXTex
+        )
         set (DXGI_MODULES ${DXGI_MODULES} d3d11)
         if (DirectX_D3D11_1_INCLUDE_DIR)
             include_directories (BEFORE SYSTEM ${DirectX_D3D11_1_INCLUDE_DIR})
@@ -214,6 +231,7 @@ if (WIN32)
                 ${CMAKE_SOURCE_DIR}/specs/d3d10misc.py
                 ${CMAKE_SOURCE_DIR}/specs/d3d10sdklayers.py
                 ${CMAKE_SOURCE_DIR}/specs/d3dcommon.py
+                ${CMAKE_SOURCE_DIR}/specs/dxgi1_2.py
                 ${CMAKE_SOURCE_DIR}/specs/dxgi.py
                 ${CMAKE_SOURCE_DIR}/specs/dxgitype.py
                 ${CMAKE_SOURCE_DIR}/specs/dxgiformat.py
@@ -235,6 +253,9 @@ if (WIN32)
         retrace_common
         d3dhelpers
     )
+    if (DirectX_D3D11_INCLUDE_DIR)
+        target_link_libraries (d3dretrace directxtex)
+    endif ()
 
     install (TARGETS d3dretrace RUNTIME DESTINATION bin)
 endif ()