blob: 59b36ffc9f6261cb6731dcf2bbbb8aa9b98cbe44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# -*- cmake -*-
include(Python)
macro (build_version _target)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/build_version.py
viewerversion.xml ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/
OUTPUT_VARIABLE ${_target}_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (${_target}_VERSION)
message(STATUS "Version of ${_target} is ${${_target}_VERSION}")
else (${_target}_VERSION)
message(SEND_ERROR "Could not determine ${_target} version")
endif (${_target}_VERSION)
endmacro (build_version)
|