xref: /reactos/dll/win32/jscript/CMakeLists.txt (revision 9be382ec)
1
2add_definitions(
3    -D__WINESRC__
4    -D__ROS_LONG64__
5    -D_USE_MATH_DEFINES)
6
7include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
8spec2def(jscript.dll jscript.spec)
9
10list(APPEND SOURCE
11    activex.c
12    array.c
13    bool.c
14    compile.c
15    date.c
16    decode.c
17    dispex.c
18    engine.c
19    enumerator.c
20    error.c
21    function.c
22    global.c
23    jscript.c
24    jscript_main.c
25    json.c
26    jsregexp.c
27    jsstr.c
28    jsutils.c
29    lex.c
30    math.c
31    number.c
32    object.c
33    regexp.c
34    string.c
35    vbarray.c)
36
37BISON_TARGET(cc_parser cc_parser.y ${CMAKE_CURRENT_BINARY_DIR}/cc_parser.tab.c COMPILE_FLAGS "-p cc_parser_")
38BISON_TARGET(parser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.tab.c COMPILE_FLAGS "-p parser_")
39
40list(APPEND PCH_SKIP_SOURCE
41    ${BISON_cc_parser_OUTPUTS}
42    ${BISON_parser_OUTPUTS})
43
44list(APPEND jscript_rc_deps
45    ${CMAKE_CURRENT_SOURCE_DIR}/jscript.rgs
46    ${CMAKE_CURRENT_SOURCE_DIR}/jscript_classes.rgs
47    ${CMAKE_CURRENT_SOURCE_DIR}/jsglobal.rgs
48    ${CMAKE_CURRENT_BINARY_DIR}/jsglobal.tlb)
49
50set_source_files_properties(rsrc.rc PROPERTIES OBJECT_DEPENDS "${jscript_rc_deps}")
51
52add_library(jscript MODULE
53    ${SOURCE}
54    ${PCH_SKIP_SOURCE}
55    rsrc.rc
56    ${CMAKE_CURRENT_BINARY_DIR}/jscript.def)
57
58if(MSVC)
59    # Disable warning C4146: unary minus operator applied to unsigned type, result still unsigned
60    # Disable warning C4267: '=': conversion from 'size_t' to 'WCHAR', possible loss of data
61    target_compile_options(jscript PRIVATE /wd4146 /wd4267)
62endif()
63
64add_idl_headers(jscript_idlheader jscript_classes.idl)
65add_typelib(jsglobal.idl)
66add_dependencies(jscript jscript_idlheader stdole2)
67set_module_type(jscript win32dll)
68target_link_libraries(jscript uuid wine)
69add_importlibs(jscript user32 ole32 oleaut32 advapi32 msvcrt kernel32 ntdll)
70add_pch(jscript precomp.h "${PCH_SKIP_SOURCE}")
71add_cd_file(TARGET jscript DESTINATION reactos/system32 FOR all)
72