diff options
author | Oz Linden <oz@lindenlab.com> | 2013-02-07 11:56:57 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-02-07 11:56:57 -0500 |
commit | d7e90f4160aaa81e30206c80047b82833c049482 (patch) | |
tree | fd27b80b5b9ffd8519418fcd47fdac2c6162da4f /indra/viewer_components | |
parent | e87000ba0750e55d9d6b55feccc4124f5d2b4b74 (diff) |
derive version number from indra/VIEWER_VERSION.txt
Diffstat (limited to 'indra/viewer_components')
-rw-r--r-- | indra/viewer_components/updater/CMakeLists.txt | 7 | ||||
-rw-r--r-- | indra/viewer_components/updater/llupdaterservice.cpp | 15 |
2 files changed, 17 insertions, 5 deletions
diff --git a/indra/viewer_components/updater/CMakeLists.txt b/indra/viewer_components/updater/CMakeLists.txt index ef82290b47..5d84f79dbd 100644 --- a/indra/viewer_components/updater/CMakeLists.txt +++ b/indra/viewer_components/updater/CMakeLists.txt @@ -38,6 +38,13 @@ set(updater_service_HEADER_FILES set_source_files_properties(${updater_service_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties( + llupdaterservice.cpp + PROPERTIES + OBJECT_DEPENDS always_generate_version + COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake + ) + list(APPEND updater_service_SOURCE_FILES ${updater_service_HEADER_FILES} diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp index bc73c72ddc..d783360f80 100644 --- a/indra/viewer_components/updater/llupdaterservice.cpp +++ b/indra/viewer_components/updater/llupdaterservice.cpp @@ -32,7 +32,6 @@ #include "lltimer.h" #include "llupdatechecker.h" #include "llupdateinstaller.h" -#include "llversionviewer.h" #include <boost/scoped_ptr.hpp> #include <boost/weak_ptr.hpp> @@ -44,6 +43,12 @@ #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally #endif +#if ! defined(LL_VIEWER_VERSION_MAJOR) \ + || ! defined(LL_VIEWER_VERSION_MINOR) \ + || ! defined(LL_VIEWER_VERSION_PATCH) \ + || ! defined(LL_VIEWER_VERSION_BUILD) +#error "Version information is undefined" +#endif namespace { @@ -609,10 +614,10 @@ std::string const & ll_get_version(void) { if (version.empty()) { std::ostringstream stream; - stream << LL_VERSION_MAJOR << "." - << LL_VERSION_MINOR << "." - << LL_VERSION_PATCH << "." - << LL_VERSION_BUILD; + stream << LL_VIEWER_VERSION_MAJOR << "." + << LL_VIEWER_VERSION_MINOR << "." + << LL_VIEWER_VERSION_PATCH << "." + << LL_VIEWER_VERSION_BUILD; version = stream.str(); } |