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/txc_compress_dxtn.c 24 ../d3dx9_36/txc_fetch_dxtn.c 25 ../d3dx9_36/util.c 26 ../d3dx9_36/volume.c 27 ../d3dx9_36/xfile.c) 28 29 list(APPEND PCH_SKIP_SOURCE 30 ../d3dx9_36/guid.c 31 ${CMAKE_CURRENT_BINARY_DIR}/${module}_stubs.c) 32 33 add_library(${module} MODULE 34 ${SOURCE} 35 ${PCH_SKIP_SOURCE} 36 version.rc 37 ${CMAKE_CURRENT_BINARY_DIR}/${module}.def) 38 39 add_definitions(-D__ROS_LONG64__) 40 set_module_type(${module} win32dll) 41 add_dependencies(${module} d3d_idl_headers) 42 target_link_libraries(${module} dxguid wine) 43 add_importlibs(${module} d3dcompiler_43 d3dxof usp10 user32 ole32 gdi32 msvcrt kernel32 ntdll) 44 add_delay_importlibs(${module} windowscodecs) 45 add_pch(${module} ../d3dx9_36/precomp.h "${PCH_SKIP_SOURCE}") 46 add_cd_file(TARGET ${module} DESTINATION reactos/system32 FOR all) 47 48 target_compile_definitions(${module} PRIVATE D3DX_SDK_VERSION=${__version} __WINESRC__ copysignf=_copysignf) 49endfunction() 50