]> git.notmuchmail.org Git - apitrace/blobdiff - wrappers/CMakeLists.txt
d2d1,dwrite: Trace both APIs together.
[apitrace] / wrappers / CMakeLists.txt
index 9cb4504e4ce251244fbafd32d369caf636d1ca0f..69d65869f5725e6002abe3c4f44b77a6c07b03bf 100644 (file)
@@ -268,7 +268,7 @@ if (WIN32)
                 ${CMAKE_SOURCE_DIR}/specs/winapi.py
                 ${CMAKE_SOURCE_DIR}/specs/stdapi.py
         )
-        add_library (d2d1 MODULE d2d1.def d2d1trace.cpp)
+        add_library (d2d1 SHARED d2d1.def d2d1trace.cpp)
         target_link_libraries (d2d1
             common_trace
             common
@@ -279,33 +279,15 @@ if (WIN32)
             PROPERTIES PREFIX ""
             OUTPUT_NAME d2d1
         )
-        install (TARGETS d2d1 LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
-
-        add_custom_command (
-            OUTPUT dwritetrace.cpp
-            COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dwritetrace.py > ${CMAKE_CURRENT_BINARY_DIR}/dwritetrace.cpp
-            DEPENDS
-                dwritetrace.py
-                trace.py
-                ${CMAKE_SOURCE_DIR}/specs/d2d1.py
-                ${CMAKE_SOURCE_DIR}/specs/d2d1.py
-                ${CMAKE_SOURCE_DIR}/specs/d2dbasetypes.py
-                ${CMAKE_SOURCE_DIR}/specs/d2derr.py
-                ${CMAKE_SOURCE_DIR}/specs/dwrite.py
-                ${CMAKE_SOURCE_DIR}/specs/dcommon.py
-                ${CMAKE_SOURCE_DIR}/specs/dxgi.py
-                ${CMAKE_SOURCE_DIR}/specs/dxgitype.py
-                ${CMAKE_SOURCE_DIR}/specs/dxgiformat.py
-                ${CMAKE_SOURCE_DIR}/specs/winapi.py
-                ${CMAKE_SOURCE_DIR}/specs/stdapi.py
-        )
-        add_library (dwrite MODULE dwrite.def dwritetrace.cpp)
-        target_link_libraries (dwrite
-            common_trace
-            common
-            ${ZLIB_LIBRARIES}
-            ${SNAPPY_LIBRARIES}
+        # http://www.cmake.org/pipermail/cmake/2009-March/028221.html
+        install (TARGETS d2d1
+            RUNTIME DESTINATION ${WRAPPER_INSTALL_DIR} COMPONENT RUNTIME
+            LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR} COMPONENT RUNTIME
         )
+
+        # dwrite.dll is just an empty stub for d2d1.dll
+        add_library (dwrite MODULE dwrite.def)
+        target_link_libraries (dwrite d2d1)
         set_target_properties (dwrite
             PROPERTIES PREFIX ""
             OUTPUT_NAME dwrite