1 file(TO_CMAKE_PATH "$ENV{ANT_DIR}" ANT_DIR_ENV_PATH)
2 file(TO_CMAKE_PATH "$ENV{ProgramFiles}" ProgramFiles_ENV_PATH)
10 find_host_program(ANT_EXECUTABLE NAMES ${ANT_NAME}
11 PATHS "${ANT_DIR_ENV_PATH}/bin" "${ProgramFiles_ENV_PATH}/apache-ant/bin"
15 find_host_program(ANT_EXECUTABLE NAMES ${ANT_NAME})
18 execute_process(COMMAND ${ANT_EXECUTABLE} -version
19 OUTPUT_VARIABLE ANT_VERSION_FULL
20 OUTPUT_STRIP_TRAILING_WHITESPACE)
21 string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" ANT_VERSION "${ANT_VERSION_FULL}")
22 set(ANT_VERSION "${ANT_VERSION}" CACHE INTERNAL "Detected ant vesion")
24 message(STATUS " Found apache ant ${ANT_VERSION}: ${ANT_EXECUTABLE}")