summaryrefslogtreecommitdiff
path: root/cmake/FindgenerateDS.cmake
blob: 77011fc6f256f367514749560aafd3eccce058d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
find_program(GENERATEDS_EXECUTABLE NAMES generateDS generateDS.py DOC "path to the generateDS executable")
mark_as_advanced(GENERATEDS_EXECUTABLE)
set(GENERATEDS_FOUND 0)
if(GENERATEDS_EXECUTABLE)
  execute_process(
      COMMAND "${GENERATEDS_EXECUTABLE}" --version
      OUTPUT_VARIABLE GENERATEDS_TEMP_VERSION
  )
  string(REGEX MATCH ".* ([0-9]+(\\.[0-9]+)+)" GENERATEDS_TEMP_VERSION_UNUSED "${GENERATEDS_TEMP_VERSION}")
  if(CMAKE_MATCH_1)
    set(GENERATEDS_FOUND 1)
    set(GENERATEDS_VERSION ${CMAKE_MATCH_1})
  endif()
endif()
if(GENERATEDS_FOUND)
  message(STATUS "The generateDS executable: ${GENERATEDS_EXECUTABLE} (found version \"${GENERATEDS_VERSION}\")")
else()
  message(STATUS "The generateDS executable not found, using existing files")
endif()