PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/indra/cmake/BuildVersion.cmake

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 18 lines | 14 code | 3 blank | 1 comment | 2 complexity | 9f05d739421905437c923d726b5bbc0b MD5 | raw file
 1# -*- cmake -*-
 2
 3include(Python)
 4
 5macro (build_version _target)
 6  execute_process(
 7      COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/build_version.py
 8        llversion${_target}.h ${LLCOMMON_INCLUDE_DIRS}
 9      OUTPUT_VARIABLE ${_target}_VERSION
10      OUTPUT_STRIP_TRAILING_WHITESPACE
11      )
12
13  if (${_target}_VERSION)
14    message(STATUS "Version of ${_target} is ${${_target}_VERSION}")
15  else (${_target}_VERSION)
16    message(SEND_ERROR "Could not determine ${_target} version")
17  endif (${_target}_VERSION)
18endmacro (build_version)