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})
9 # find editbin.exe from environmental variable VCToolsInstallDir
10 set(EDITBIN_DIRECTORY "$ENV{VCToolsInstallDir}/bin/Hostx64/x64")
14 message(CHECK_START "Finding editbin.exe")
16 EDITBIN_EXECUTABLE editbin.exe
17 HINTS ${EDITBIN_DIRECTORY}
20 if(EDITBIN_EXECUTABLE)
21 message(CHECK_PASS "found")
23 message(CHECK_FAIL "not found , please manually specify EDITBIN_DIRECTORY")
26 include(FindPackageHandleStandardArgs)
27 find_package_handle_standard_args(Editbin
28 FOUND_VAR EDITBIN_FOUND
29 REQUIRED_VARS EDITBIN_EXECUTABLE