2011-05-16 21:12:07 +08:00
|
|
|
|
2015-09-07 00:44:30 +08:00
|
|
|
function(add_host_tool _tool)
|
|
|
|
add_executable(${_tool} ${ARGN})
|
2018-10-01 19:07:44 +08:00
|
|
|
set_target_properties(${_tool} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TOOLS_FOLDER})
|
2015-09-07 00:44:30 +08:00
|
|
|
endfunction()
|
|
|
|
|
2021-04-22 16:37:50 +08:00
|
|
|
function(add_host_module _module)
|
|
|
|
add_library(${_module} MODULE ${ARGN})
|
|
|
|
set_target_properties(${_module} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${TOOLS_FOLDER})
|
|
|
|
endfunction()
|
|
|
|
|
2011-06-13 18:36:40 +08:00
|
|
|
if(MSVC)
|
2019-04-15 19:29:33 +08:00
|
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -DHAVE_IO_H=1)
|
2020-09-18 22:18:24 +08:00
|
|
|
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/EHsc>")
|
2019-04-15 19:29:33 +08:00
|
|
|
|
|
|
|
# Disable warning "conversion from 'size_t' to 'int', possible loss of data"
|
2020-09-18 22:18:24 +08:00
|
|
|
add_compile_options("/wd4267")
|
2011-06-13 18:36:40 +08:00
|
|
|
endif()
|
|
|
|
|
2015-09-07 00:44:30 +08:00
|
|
|
add_host_tool(bin2c bin2c.c)
|
|
|
|
add_host_tool(gendib gendib/gendib.c)
|
|
|
|
add_host_tool(geninc geninc/geninc.c)
|
|
|
|
add_host_tool(mkshelllink mkshelllink/mkshelllink.c)
|
|
|
|
add_host_tool(obj2bin obj2bin/obj2bin.c)
|
2019-11-15 21:07:46 +08:00
|
|
|
target_link_libraries(obj2bin PRIVATE host_includes)
|
|
|
|
|
2015-09-07 00:44:30 +08:00
|
|
|
add_host_tool(spec2def spec2def/spec2def.c)
|
|
|
|
add_host_tool(utf16le utf16le/utf16le.cpp)
|
2012-09-14 19:12:40 +08:00
|
|
|
|
2022-06-20 23:29:01 +08:00
|
|
|
add_subdirectory(asmpp)
|
2011-05-16 21:12:07 +08:00
|
|
|
add_subdirectory(cabman)
|
2019-04-15 19:29:33 +08:00
|
|
|
add_subdirectory(fatten)
|
2015-08-12 05:26:29 +08:00
|
|
|
add_subdirectory(hhpcomp)
|
2015-01-08 01:55:58 +08:00
|
|
|
add_subdirectory(hpp)
|
2017-01-25 06:53:20 +08:00
|
|
|
add_subdirectory(isohybrid)
|
2015-01-08 01:55:58 +08:00
|
|
|
add_subdirectory(kbdtool)
|
2022-10-25 03:56:54 +08:00
|
|
|
add_subdirectory(log2lines)
|
2011-05-16 21:12:07 +08:00
|
|
|
add_subdirectory(mkhive)
|
2016-10-28 06:51:59 +08:00
|
|
|
add_subdirectory(mkisofs)
|
2022-10-25 03:56:54 +08:00
|
|
|
add_subdirectory(rsym)
|
2021-05-18 15:27:52 +08:00
|
|
|
add_subdirectory(txt2nls)
|
2011-05-16 21:12:07 +08:00
|
|
|
add_subdirectory(unicode)
|
|
|
|
add_subdirectory(widl)
|
|
|
|
add_subdirectory(wpp)
|
2016-07-11 00:14:39 +08:00
|
|
|
add_subdirectory(xml2sdb)
|
2014-11-28 03:09:07 +08:00
|
|
|
|
2021-04-22 17:11:34 +08:00
|
|
|
if ((ARCH STREQUAL "amd64") AND (TARGET_COMPILER_ID STREQUAL "GNU"))
|
|
|
|
add_subdirectory(gcc_plugin_seh)
|
|
|
|
endif()
|
|
|
|
|
2012-08-02 07:25:06 +08:00
|
|
|
if(NOT MSVC)
|
2020-04-13 18:20:47 +08:00
|
|
|
add_host_tool(pefixup pefixup.c)
|
2022-10-25 03:56:54 +08:00
|
|
|
if (ARCH STREQUAL "amd64" OR ARCH STREQUAL "arm64")
|
|
|
|
target_compile_definitions(pefixup PRIVATE _TARGET_PE64)
|
|
|
|
endif()
|
2020-04-13 18:20:47 +08:00
|
|
|
target_link_libraries(pefixup PRIVATE host_includes)
|
2011-05-16 21:12:07 +08:00
|
|
|
endif()
|