3 set(native_suffix ".exe")
6 string(TOUPPER ${CMAKE_BUILD_TYPE} _build_type)
9 list(APPEND host_tools_list bin2c hpp widl gendib cabman fatten isohybrid mkhive mkisofs obj2bin spec2def geninc mkshelllink utf16le xml2sdb)
11 list(APPEND host_tools_list rsym)
14 foreach(_host_tool ${host_tools_list})
16 get_filename_component(_tool_location "${CMAKE_CURRENT_BINARY_DIR}/host-tools/${CMAKE_BUILD_TYPE}/${_host_tool}${native_suffix}" ABSOLUTE)
18 get_filename_component(_tool_location "${CMAKE_CURRENT_BINARY_DIR}/host-tools/${_host_tool}${native_suffix}" ABSOLUTE)
20 list(APPEND tools_binaries ${_tool_location})
21 add_executable(native-${_host_tool} IMPORTED)
22 set_property(TARGET native-${_host_tool} PROPERTY IMPORTED_LOCATION_${_build_type} ${_tool_location})
23 add_dependencies(native-${_host_tool} host-tools)
27 # FIXME: Fix host tools build with clang
28 #set(USE_CLANG_CL_ARG "-DCMAKE_C_COMPILER=clang-cl;-DCMAKE_CXX_COMPILER=clang-cl")
31 include(ExternalProject)
33 ExternalProject_Add(host-tools
34 SOURCE_DIR ${REACTOS_SOURCE_DIR}
35 BINARY_DIR ${REACTOS_BINARY_DIR}/host-tools
36 STAMP_DIR ${REACTOS_BINARY_DIR}/host-tools/stamps
40 CMAKE_ARGS "-DNEW_STYLE_BUILD=1;-DARCH:STRING=${ARCH};${USE_CLANG_CL_ARG}"
42 BUILD_BYPRODUCTS ${tools_binaries})