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