From 72b4a1962f9f036d2bd8e0094e999d6750a18eae Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Tue, 12 Feb 2013 12:42:14 -0500
Subject: [PATCH] correct dependencies for forcing version number
 recompilations

---
 indra/newview/CMakeLists.txt                   | 14 +++++++-------
 indra/viewer_components/updater/CMakeLists.txt |  1 +
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 22bc09d2df1..627842297e7 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1227,13 +1227,6 @@ set(viewer_HEADER_FILES
 
 source_group("CMake Rules" FILES ViewerInstall.cmake)
 
-set_source_files_properties(
-   llversioninfo.cpp tests/llversioninfo_test.cpp 
-   PROPERTIES
-   OBJECT_DEPENDS always_generate_version
-   COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake
-   )
-
 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
                    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/VIEWER_VERSION.txt
                    COMMAND echo "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
@@ -1242,6 +1235,13 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
 add_custom_target(generate_viewer_version DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt")
 add_dependencies(generate_viewer_version "${CMAKE_CURRENT_SOURCE_DIR}/VIEWER_VERSION.txt")
 
+set_source_files_properties(
+   llversioninfo.cpp tests/llversioninfo_test.cpp 
+   PROPERTIES
+   OBJECT_DEPENDS generate_viewer_version
+   COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake
+   )
+
 if (DARWIN)
   LIST(APPEND viewer_SOURCE_FILES llappviewermacosx.cpp)
 
diff --git a/indra/viewer_components/updater/CMakeLists.txt b/indra/viewer_components/updater/CMakeLists.txt
index 5d84f79dbd1..7ab3711fde8 100644
--- a/indra/viewer_components/updater/CMakeLists.txt
+++ b/indra/viewer_components/updater/CMakeLists.txt
@@ -38,6 +38,7 @@ set(updater_service_HEADER_FILES
 set_source_files_properties(${updater_service_HEADER_FILES}
                             PROPERTIES HEADER_FILE_ONLY TRUE)
 
+add_custom_target(always_generate_version) # force recompilation with version values
 set_source_files_properties(
    llupdaterservice.cpp 
    PROPERTIES
-- 
GitLab