xref: /reactos/dll/directx/wine/d3dx9_36/d3dx9.cmake (revision d8c6ef5e)
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        ../d3dx9_36/precomp.h)
27
28    add_library(${module} MODULE
29        ${SOURCE}
30        ../d3dx9_36/guid.c
31        version.rc
32        ${CMAKE_CURRENT_BINARY_DIR}/${module}_stubs.c
33        ${CMAKE_CURRENT_BINARY_DIR}/${module}.def)
34
35    add_definitions(-D__ROS_LONG64__)
36    set_module_type(${module} win32dll)
37    add_dependencies(${module} d3d_idl_headers)
38    target_link_libraries(${module} dxguid wine)
39    add_importlibs(${module} d3dcompiler_43 d3dxof d3dwine user32 ole32 gdi32 msvcrt kernel32 ntdll)
40    add_delay_importlibs(${module} windowscodecs)
41    add_pch(${module} ../d3dx9_36/precomp.h SOURCE)
42    add_cd_file(TARGET ${module} DESTINATION reactos/system32 FOR all)
43
44    target_compile_definitions(${module} PRIVATE -DD3DX_SDK_VERSION=${__version} -D__WINESRC__ -Dcopysignf=_copysignf)
45    target_include_directories(${module} PRIVATE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
46endfunction()
47