/indra/cmake/BuildVersion.cmake
CMake | 18 lines | 14 code | 3 blank | 1 comment | 2 complexity | 9f05d739421905437c923d726b5bbc0b MD5 | raw file
Possible License(s): LGPL-2.1
- # -*- cmake -*-
- include(Python)
- macro (build_version _target)
- execute_process(
- COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/build_version.py
- llversion${_target}.h ${LLCOMMON_INCLUDE_DIRS}
- 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)