Merge pull request #694 from mistydemeo:fix_java_detection

pull/720/merge
Andrey Kamaev 12 years ago committed by OpenCV Buildbot
commit 3ceca9b7b1
  1. 12
      cmake/OpenCVDetectApacheAnt.cmake

@ -16,10 +16,16 @@ find_host_program(ANT_EXECUTABLE NAMES ${ANT_NAME})
if(ANT_EXECUTABLE)
execute_process(COMMAND ${ANT_EXECUTABLE} -version
RESULT_VARIABLE ANT_ERROR_LEVEL
OUTPUT_VARIABLE ANT_VERSION_FULL
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" ANT_VERSION "${ANT_VERSION_FULL}")
set(ANT_VERSION "${ANT_VERSION}" CACHE INTERNAL "Detected ant vesion")
if (ANT_ERROR_LEVEL)
unset(ANT_EXECUTABLE)
unset(ANT_EXECUTABLE CACHE)
else()
string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" ANT_VERSION "${ANT_VERSION_FULL}")
set(ANT_VERSION "${ANT_VERSION}" CACHE INTERNAL "Detected ant vesion")
message(STATUS "Found apache ant ${ANT_VERSION}: ${ANT_EXECUTABLE}")
message(STATUS "Found apache ant ${ANT_VERSION}: ${ANT_EXECUTABLE}")
endif()
endif()

Loading…
Cancel
Save