- # ddraw.dll
- if (DirectX_D3D_INCLUDE_DIR)
- include_directories (SYSTEM ${DirectX_D3D_INCLUDE_DIR})
- add_custom_command (
- OUTPUT ddraw.cpp
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d.py > ${CMAKE_CURRENT_BINARY_DIR}/ddraw.cpp
- DEPENDS d3d.py d3dtypes.py d3dcaps.py ddraw.py trace.py winapi.py stdapi.py
- )
- add_library (ddraw MODULE ddraw.def ddraw.cpp trace_writer.cpp os_win32.cpp)
- set_target_properties (ddraw
- PROPERTIES PREFIX ""
- RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
- LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
- )
- install (TARGETS ddraw LIBRARY DESTINATION wrappers)
- endif (DirectX_D3D_INCLUDE_DIR)
-
- # d3d8.dll
- if (DirectX_D3D8_INCLUDE_DIR AND DirectX_D3DX9_INCLUDE_DIR)
- include_directories (SYSTEM ${DirectX_D3D8_INCLUDE_DIR} ${DirectX_D3DX9_INCLUDE_DIR})
- add_custom_command (
- OUTPUT d3d8.cpp
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d8.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d8.cpp
- DEPENDS d3d8.py trace.py d3d8types.py d3d8caps.py winapi.py stdapi.py
- )
- add_library (d3d8 MODULE d3d8.def d3d8.cpp d3dshader.cpp trace_writer.cpp os_win32.cpp)
- set_target_properties (d3d8
- PROPERTIES PREFIX ""
- RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
- LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
- )
- install (TARGETS d3d8 LIBRARY DESTINATION wrappers)
- endif (DirectX_D3D8_INCLUDE_DIR AND DirectX_D3DX9_INCLUDE_DIR)
-
- # d3d9.dll
- if (DirectX_D3DX9_INCLUDE_DIR)
- include_directories (SYSTEM ${DirectX_D3DX9_INCLUDE_DIR})
- add_custom_command (
- OUTPUT d3d9.cpp
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d9.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d9.cpp
- DEPENDS d3d9.py trace.py d3d9types.py d3d9caps.py winapi.py stdapi.py
- )
- add_library (d3d9 MODULE d3d9.def d3d9.cpp d3dshader.cpp trace_writer.cpp os_win32.cpp)
- set_target_properties (d3d9
- PROPERTIES PREFIX ""
- RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
- LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
- )
- install (TARGETS d3d9 LIBRARY DESTINATION wrappers)
- endif (DirectX_D3DX9_INCLUDE_DIR)
-
- # d3d10.dll
- #if (DirectX_D3D10_INCLUDE_DIR)
- # include_directories (SYSTEM ${DirectX_D3D10_INCLUDE_DIR})
- # add_custom_command (
- # OUTPUT d3d10.cpp
- # COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d10misc.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d10.cpp
- # DEPENDS d3d10misc.py winapi.py stdapi.py
- # )
- # add_library (d3d10 MODULE d3d10.def d3d10.cpp trace_writer.cpp os_win32.cpp)
- # set_target_properties (d3d10 PROPERTIES PREFIX "")
- # install (TARGETS d3d10 LIBRARY DESTINATION wrappers)
- #endif (DirectX_D3D10_INCLUDE_DIR)
-
- # opengl32.dll
- add_custom_command (
- OUTPUT wgltrace.cpp
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wgltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/wgltrace.cpp
- DEPENDS wgltrace.py gltrace.py trace.py wglapi.py wglenum.py glapi.py glparams.py gltypes.py winapi.py stdapi.py
- )
- add_library (wgltrace MODULE opengl32.def wgltrace.cpp trace_writer.cpp os_win32.cpp ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp)
- set_target_properties (wgltrace PROPERTIES
- PREFIX ""
- OUTPUT_NAME opengl32
- RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
- LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
- )
- if (MINGW)
- set_target_properties(wgltrace PROPERTIES LINK_FLAGS "-Wl,--enable-stdcall-fixup ${CMAKE_CURRENT_SOURCE_DIR}/opengl32.def")
- endif (MINGW)
- install (TARGETS wgltrace LIBRARY DESTINATION wrappers)