1
2add_definitions(
3    -D__WINESRC__
4    -D__ROS_LONG64__
5    -Dstrcasecmp=_stricmp
6    -DDIRECT3D_VERSION=0x0900)
7
8include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
9spec2def(d3dcompiler_43.dll d3dcompiler_43.spec ADD_IMPORTLIB)
10
11list(APPEND SOURCE
12    asmparser.c
13    blob.c
14    bytecodewriter.c
15    compiler.c
16    main.c
17    preproc.c
18    reflection.c
19    utils.c)
20
21FLEX_TARGET(asmshader_scanner asmshader.l ${CMAKE_CURRENT_BINARY_DIR}/asmshader.yy.c)
22BISON_TARGET(asmshader_parser asmshader.y ${CMAKE_CURRENT_BINARY_DIR}/asmshader.tab.c COMPILE_FLAGS "-p asmshader_")
23ADD_FLEX_BISON_DEPENDENCY(asmshader_scanner asmshader_parser)
24
25FLEX_TARGET(hlsl_scanner hlsl.l ${CMAKE_CURRENT_BINARY_DIR}/hlsl.yy.c)
26BISON_TARGET(hlsl_parser hlsl.y ${CMAKE_CURRENT_BINARY_DIR}/hlsl.tab.c COMPILE_FLAGS "-p hlsl_")
27ADD_FLEX_BISON_DEPENDENCY(hlsl_scanner hlsl_parser)
28
29FLEX_TARGET(pp_scanner ppl.l ${CMAKE_CURRENT_BINARY_DIR}/ppl.yy.c)
30BISON_TARGET(pp_parser ppy.y ${CMAKE_CURRENT_BINARY_DIR}/ppy.tab.c COMPILE_FLAGS "-p ppy_")
31ADD_FLEX_BISON_DEPENDENCY(pp_scanner pp_parser)
32
33list(APPEND PCH_SKIP_SOURCE
34    ${FLEX_asmshader_scanner_OUTPUTS}
35    ${BISON_asmshader_parser_OUTPUTS}
36    ${FLEX_hlsl_scanner_OUTPUTS}
37    ${BISON_hlsl_parser_OUTPUTS}
38    ${FLEX_pp_scanner_OUTPUTS}
39    ${BISON_pp_parser_OUTPUTS})
40
41add_library(d3dcompiler_43 MODULE
42    ${SOURCE}
43    ${PCH_SKIP_SOURCE}
44    version.rc
45    ${CMAKE_CURRENT_BINARY_DIR}/d3dcompiler_43_stubs.c
46    ${CMAKE_CURRENT_BINARY_DIR}/d3dcompiler_43.def)
47
48set_module_type(d3dcompiler_43 win32dll)
49target_link_libraries(d3dcompiler_43 dx10guid uuid wine wpp)
50add_importlibs(d3dcompiler_43 msvcrt kernel32 ntdll)
51add_dependencies(d3dcompiler_43 d3d_idl_headers)
52add_pch(d3dcompiler_43 precomp.h "${PCH_SKIP_SOURCE}")
53add_cd_file(TARGET d3dcompiler_43 DESTINATION reactos/system32 FOR all)
54