xref: /reactos/dll/win32/vbscript/CMakeLists.txt (revision 3e1f4074)
1
2add_definitions(-D__WINESRC__ -D__ROS_LONG64__)
3include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
4spec2def(vbscript.dll vbscript.spec)
5
6list(APPEND SOURCE
7    compile.c
8    global.c
9    interp.c
10    lex.c
11    regexp.c
12    utils.c
13    vbdisp.c
14    vbregexp.c
15    vbscript.c
16    vbscript_main.c)
17
18BISON_TARGET(parser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.tab.c COMPILE_FLAGS "-p parser_")
19
20list(APPEND PCH_SKIP_SOURCE
21    ${BISON_parser_OUTPUTS})
22
23list(APPEND vbscript_rc_deps
24    ${CMAKE_CURRENT_SOURCE_DIR}/vbscript_classes.rgs
25    ${CMAKE_CURRENT_SOURCE_DIR}/vbsglobal.rgs
26    ${CMAKE_CURRENT_SOURCE_DIR}/vbsregexp10.rgs
27    ${CMAKE_CURRENT_SOURCE_DIR}/vbsregexp55.rgs
28    ${CMAKE_CURRENT_BINARY_DIR}/vbsglobal.tlb
29    ${CMAKE_CURRENT_BINARY_DIR}/vbsregexp10.tlb
30    ${CMAKE_CURRENT_BINARY_DIR}/vbsregexp55.tlb)
31
32set_source_files_properties(vbscript.rc PROPERTIES OBJECT_DEPENDS "${vbscript_rc_deps}")
33add_idl_headers(vbscript_idlheader vbscript_classes.idl vbsglobal.idl vbsregexp55.idl)
34add_typelib(vbsglobal.idl vbsregexp10.idl vbsregexp55.idl)
35
36add_library(vbscript MODULE
37    ${SOURCE}
38    ${PCH_SKIP_SOURCE}
39    vbscript.rc
40    ${CMAKE_CURRENT_BINARY_DIR}/vbscript.def)
41
42if(MSVC)
43    # Disable warning C4267: '=': conversion from 'size_t' to 'WCHAR', possible loss of data
44    target_compile_options(vbscript PRIVATE /wd4267)
45endif()
46
47set_module_type(vbscript win32dll)
48target_link_libraries(vbscript uuid wine)
49add_importlibs(vbscript oleaut32 ole32 user32 msvcrt kernel32 ntdll)
50add_dependencies(vbscript vbscript_idlheader stdole2)
51add_pch(vbscript precomp.h "${PCH_SKIP_SOURCE}")
52add_cd_file(TARGET vbscript DESTINATION reactos/system32 FOR all)
53