Update: Translations from eints
[openttd-github.git] / cmake / FindEditbin.cmake
blobf4d55d7cb79198761043456241b643e44cb3fcdb
1 # Autodetect editbin. Only useful for MSVC.
3 if(NOT EDITBIN_DIRECTORY)
4     if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
5         get_filename_component(MSVC_COMPILE_DIRECTORY ${CMAKE_CXX_COMPILER} DIRECTORY)
6         set(EDITBIN_DIRECTORY ${MSVC_COMPILE_DIRECTORY})
7     else()
8         # For clang-cl build
9         # find editbin.exe from environmental variable VCToolsInstallDir
10         set(EDITBIN_DIRECTORY "$ENV{VCToolsInstallDir}/bin/Hostx64/x64")
11     endif()
12 endif()
14 message(CHECK_START "Finding editbin.exe")
15 find_program(
16     EDITBIN_EXECUTABLE editbin.exe
17     HINTS ${EDITBIN_DIRECTORY}
20 if(EDITBIN_EXECUTABLE)
21     message(CHECK_PASS "found")
22 else()
23     message(CHECK_FAIL "not found , please manually specify EDITBIN_DIRECTORY")
24 endif()
26 include(FindPackageHandleStandardArgs)
27 find_package_handle_standard_args(Editbin
28     FOUND_VAR EDITBIN_FOUND
29     REQUIRED_VARS EDITBIN_EXECUTABLE