xref: /reactos/sdk/tools/CMakeLists.txt (revision ccef43f3)
1
2function(add_host_tool _tool)
3    add_executable(${_tool} ${ARGN})
4    set_target_properties(${_tool} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TOOLS_FOLDER})
5endfunction()
6
7function(add_host_module _module)
8    add_library(${_module} MODULE ${ARGN})
9    set_target_properties(${_module} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${TOOLS_FOLDER})
10endfunction()
11
12if(MSVC)
13    add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_IO_H=1)
14    add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/EHsc>")
15
16    # Disable warning "conversion from 'size_t' to 'int', possible loss of data"
17    add_compile_options("/wd4267")
18endif()
19
20add_host_tool(bin2c bin2c.c)
21add_host_tool(gendib gendib/gendib.c)
22add_host_tool(geninc geninc/geninc.c)
23add_host_tool(mkshelllink mkshelllink/mkshelllink.c)
24add_host_tool(obj2bin obj2bin/obj2bin.c)
25target_link_libraries(obj2bin PRIVATE host_includes)
26
27add_host_tool(spec2def spec2def/spec2def.c)
28add_host_tool(utf16le utf16le/utf16le.cpp)
29
30add_subdirectory(asmpp)
31add_subdirectory(cabman)
32add_subdirectory(fatten)
33add_subdirectory(hhpcomp)
34add_subdirectory(hpp)
35add_subdirectory(isohybrid)
36add_subdirectory(kbdtool)
37add_subdirectory(log2lines)
38add_subdirectory(mkhive)
39add_subdirectory(mkisofs)
40add_subdirectory(rsym)
41add_subdirectory(txt2nls)
42add_subdirectory(unicode)
43add_subdirectory(widl)
44add_subdirectory(wpp)
45add_subdirectory(xml2sdb)
46
47if ((ARCH STREQUAL "amd64") AND (TARGET_COMPILER_ID STREQUAL "GNU"))
48    add_subdirectory(gcc_plugin_seh)
49endif()
50
51if(NOT MSVC)
52    add_host_tool(pefixup pefixup.c)
53    if (ARCH STREQUAL "amd64" OR ARCH STREQUAL "arm64")
54        target_compile_definitions(pefixup PRIVATE _TARGET_PE64)
55    endif()
56    target_link_libraries(pefixup PRIVATE host_includes)
57endif()
58