diff options
author | Jacek Antonelli | 2011-05-19 00:40:19 -0500 |
---|---|---|
committer | Jacek Antonelli | 2011-05-19 00:40:19 -0500 |
commit | 7a5a907f4918b20cf77d2a3ed33ef5e6d8c3844a (patch) | |
tree | 84dfe9623a32a7c434536b3ca8a7f018f01ec5ee /linden/indra/cmake | |
parent | Ported viewerinfo.cpp from Kokua. (diff) | |
download | meta-impy-7a5a907f4918b20cf77d2a3ed33ef5e6d8c3844a.zip meta-impy-7a5a907f4918b20cf77d2a3ed33ef5e6d8c3844a.tar.gz meta-impy-7a5a907f4918b20cf77d2a3ed33ef5e6d8c3844a.tar.bz2 meta-impy-7a5a907f4918b20cf77d2a3ed33ef5e6d8c3844a.tar.xz |
Ported viewer_info.py and BuildVersion.cmake from Kokua.
viewer_info.py provides a way to easily query the viewer name and
version (from viewerinfo.cpp). It replaces build_version.py, which has
been removed. BuildVersion.cmake has been updated to use
viewer_info.py instead of build_version.py.
Diffstat (limited to 'linden/indra/cmake')
-rw-r--r-- | linden/indra/cmake/BuildVersion.cmake | 25 |
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 | ||
3 | include(Python) | 3 | include(Python) |
4 | 4 | ||
5 | if (NOT SCRIPTS_DIR) | ||
6 | set( SCRIPTS_DIR "${CMAKE_SOURCE_DIR}/../scripts" ) | ||
7 | endif (NOT SCRIPTS_DIR) | ||
8 | |||
5 | macro (build_version _target) | 9 | macro (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") |
18 | endmacro (build_version) | 33 | endmacro (build_version) |