aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake/BuildVersion.cmake
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/cmake/BuildVersion.cmake25
1 files changed, 20 insertions, 5 deletions
diff --git a/linden/indra/cmake/BuildVersion.cmake b/linden/indra/cmake/BuildVersion.cmake
index 59b36ff..f86e9e5 100644
--- a/linden/indra/cmake/BuildVersion.cmake
+++ b/linden/indra/cmake/BuildVersion.cmake
@@ -2,17 +2,32 @@
2 2
3include(Python) 3include(Python)
4 4
5if (NOT SCRIPTS_DIR)
6 set( SCRIPTS_DIR "${CMAKE_SOURCE_DIR}/../scripts" )
7endif (NOT SCRIPTS_DIR)
8
5macro (build_version _target) 9macro (build_version _target)
6 execute_process( 10 execute_process(
7 COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/build_version.py 11 COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/viewer_info.py --version
8 viewerversion.xml ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/
9 OUTPUT_VARIABLE ${_target}_VERSION 12 OUTPUT_VARIABLE ${_target}_VERSION
10 OUTPUT_STRIP_TRAILING_WHITESPACE 13 OUTPUT_STRIP_TRAILING_WHITESPACE
11 ) 14 )
12 15
13 if (${_target}_VERSION) 16 execute_process(
14 message(STATUS "Version of ${_target} is ${${_target}_VERSION}") 17 COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/viewer_info.py --name
18 OUTPUT_VARIABLE ${_target}_NAME
19 OUTPUT_STRIP_TRAILING_WHITESPACE
20 )
21
22 execute_process(
23 COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/viewer_info.py --bundle-id
24 OUTPUT_VARIABLE ${_target}_BUNDLE_ID
25 OUTPUT_STRIP_TRAILING_WHITESPACE
26 )
27
28 if ("${_target}_VERSION" AND "${_target}_NAME")
29 message(STATUS "Version of ${_target} is ${${_target}_NAME} ${${_target}_VERSION}")
15 else (${_target}_VERSION) 30 else (${_target}_VERSION)
16 message(SEND_ERROR "Could not determine ${_target} version") 31 message(SEND_ERROR "Could not determine ${_target} version")
17 endif (${_target}_VERSION) 32 endif ("${_target}_VERSION" AND "${_target}_NAME")
18endmacro (build_version) 33endmacro (build_version)