X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=wrappers%2FCMakeLists.txt;h=259c7fb4759d03887ab23457d3f3227ead5d23f1;hb=537c507874cdde0b507d306ac058767f506da8e2;hp=602932bf724585447529beae5d72a43c1c8849fe;hpb=fbbb1e2ca5f554f0fcf8863367f55da5281b9c6b;p=apitrace diff --git a/wrappers/CMakeLists.txt b/wrappers/CMakeLists.txt index 602932b..259c7fb 100644 --- a/wrappers/CMakeLists.txt +++ b/wrappers/CMakeLists.txt @@ -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} @@ -64,8 +73,9 @@ if (WIN32) ${CMAKE_SOURCE_DIR}/specs/winapi.py ${CMAKE_SOURCE_DIR}/specs/stdapi.py ) - add_library (d3d8trace MODULE d3d8.def d3d8trace.cpp d3dshader.cpp) + add_library (d3d8trace MODULE d3d8.def d3d8trace.cpp d3d9shader.cpp) target_link_libraries (d3d8trace + common_trace common ${ZLIB_LIBRARIES} ${SNAPPY_LIBRARIES} @@ -94,8 +104,9 @@ if (WIN32) ${CMAKE_SOURCE_DIR}/specs/winapi.py ${CMAKE_SOURCE_DIR}/specs/stdapi.py ) - add_library (d3d9trace MODULE d3d9.def d3d9trace.cpp d3dshader.cpp) + add_library (d3d9trace MODULE d3d9.def d3d9trace.cpp d3d9shader.cpp) target_link_libraries (d3d9trace + common_trace common ${ZLIB_LIBRARIES} ${SNAPPY_LIBRARIES} @@ -118,9 +129,11 @@ if (WIN32) dlltrace.py trace.py ${CMAKE_SOURCE_DIR}/dispatch/dispatch.py - ${CMAKE_SOURCE_DIR}/specs/d3d10misc.py ${CMAKE_SOURCE_DIR}/specs/d3d10.py + ${CMAKE_SOURCE_DIR}/specs/d3d10misc.py ${CMAKE_SOURCE_DIR}/specs/d3d10sdklayers.py + ${CMAKE_SOURCE_DIR}/specs/d3d10shader.py + ${CMAKE_SOURCE_DIR}/specs/d3d10effect.py ${CMAKE_SOURCE_DIR}/specs/d3dcommon.py ${CMAKE_SOURCE_DIR}/specs/dxgi.py ${CMAKE_SOURCE_DIR}/specs/dxgitype.py @@ -128,8 +141,9 @@ if (WIN32) ${CMAKE_SOURCE_DIR}/specs/winapi.py ${CMAKE_SOURCE_DIR}/specs/stdapi.py ) - add_library (d3d10trace MODULE d3d10.def d3d10trace.cpp) + add_library (d3d10trace MODULE d3d10.def d3d10trace.cpp d3d10shader.cpp) target_link_libraries (d3d10trace + common_trace common ${ZLIB_LIBRARIES} ${SNAPPY_LIBRARIES} @@ -164,6 +178,7 @@ if (WIN32) ) add_library (d3d10_1trace MODULE d3d10_1.def d3d10_1trace.cpp) target_link_libraries (d3d10_1trace + common_trace common ${ZLIB_LIBRARIES} ${SNAPPY_LIBRARIES} @@ -203,6 +218,7 @@ if (WIN32) ) add_library (d3d11trace MODULE d3d11.def d3d11trace.cpp) target_link_libraries (d3d11trace + common_trace common ${ZLIB_LIBRARIES} ${SNAPPY_LIBRARIES} @@ -238,6 +254,7 @@ if (WIN32) add_dependencies (wgltrace glproc) target_link_libraries (wgltrace glproc_gl + common_trace common ${ZLIB_LIBRARIES} ${SNAPPY_LIBRARIES} @@ -280,6 +297,7 @@ elseif (APPLE) target_link_libraries (cgltrace glproc_gl + common_trace common ${ZLIB_LIBRARIES} ${SNAPPY_LIBRARIES} @@ -321,6 +339,7 @@ elseif (X11_FOUND) target_link_libraries (glxtrace glproc_gl + common_trace common ${ZLIB_LIBRARIES} ${SNAPPY_LIBRARIES} @@ -367,6 +386,7 @@ if (ENABLE_EGL AND NOT WIN32 AND NOT APPLE) target_link_libraries (egltrace glproc_egl + common_trace common ${ZLIB_LIBRARIES} ${SNAPPY_LIBRARIES}