xref: /reactos/dll/directx/wine/d3dx9_36/d3dx9.cmake (revision 7b1049c8)
1
2function(add_d3dx9_target __version)
3    set(module d3dx9_${__version})
4
5    spec2def(${module}.dll ${module}.spec ADD_IMPORTLIB)
6
7    list(APPEND SOURCE
8        ../d3dx9_36/animation.c
9        ../d3dx9_36/core.c
10        ../d3dx9_36/effect.c
11        ../d3dx9_36/font.c
12        ../d3dx9_36/line.c
13        ../d3dx9_36/main.c
14        ../d3dx9_36/math.c
15        ../d3dx9_36/mesh.c
16        ../d3dx9_36/preshader.c
17        ../d3dx9_36/render.c
18        ../d3dx9_36/shader.c
19        ../d3dx9_36/skin.c
20        ../d3dx9_36/sprite.c
21        ../d3dx9_36/surface.c
22        ../d3dx9_36/texture.c
23        ../d3dx9_36/util.c
24        ../d3dx9_36/volume.c
25        ../d3dx9_36/xfile.c)
26
27    list(APPEND PCH_SKIP_SOURCE
28        ../d3dx9_36/guid.c
29        ${CMAKE_CURRENT_BINARY_DIR}/${module}_stubs.c)
30
31    add_library(${module} MODULE
32        ${SOURCE}
33        ${PCH_SKIP_SOURCE}
34        version.rc
35        ${CMAKE_CURRENT_BINARY_DIR}/${module}.def)
36
37    add_definitions(-D__ROS_LONG64__)
38    set_module_type(${module} win32dll)
39    add_dependencies(${module} d3d_idl_headers)
40    target_link_libraries(${module} dxguid wine)
41    add_importlibs(${module} d3dcompiler_43 d3dxof user32 ole32 gdi32 msvcrt kernel32 ntdll)
42    add_delay_importlibs(${module} windowscodecs)
43    add_pch(${module} ../d3dx9_36/precomp.h "${PCH_SKIP_SOURCE}")
44    add_cd_file(TARGET ${module} DESTINATION reactos/system32 FOR all)
45
46    target_compile_definitions(${module} PRIVATE -DD3DX_SDK_VERSION=${__version} -D__WINESRC__ -Dcopysignf=_copysignf)
47    target_include_directories(${module} PRIVATE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
48endfunction()
49