From 6b0427dbc2e88271f7704a6c65f2bc2ea11a5928 Mon Sep 17 00:00:00 2001
From: Nicky <nicky.dasmijn@gmail.com>
Date: Sun, 8 May 2022 01:34:21 +0200
Subject: [PATCH] - Slightly better documentation string for --configuration,
 as this really is used for the configs build subdirectory. - Always pass the
 correct configuration for --buildtype - Use 'buildtype' when determining
 defbug/release/... build. --configuration should not be used for this, as it
 is the subdirectories name (CMAKE_CFG_INTDIR)

---
 indra/lib/python/indra/util/llmanifest.py | 2 +-
 indra/newview/CMakeLists.txt              | 8 ++++----
 indra/newview/viewer_manifest.py          | 8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py
index c1c199a4384..6705c86da94 100755
--- a/indra/lib/python/indra/util/llmanifest.py
+++ b/indra/lib/python/indra/util/llmanifest.py
@@ -125,7 +125,7 @@ def get_default_platform(dummy):
          but not application name (used internally)""",
          default=None),
     dict(name='configuration',
-         description="""The build configuration used.""",
+         description="""The build configurations sub directory used.""",
          default="Release"),
     dict(name='dest', description='Destination directory.', default=DEFAULT_SRCTREE),
     dict(name='grid',
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 93a29645d0e..022f39cfae4 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1749,7 +1749,7 @@ if (WINDOWS)
         "--fmodstudio=${USE_FMODSTUDIO}"
         "--openal=${USE_OPENAL}"
         --build=${CMAKE_CURRENT_BINARY_DIR}
-        --buildtype=$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>
+        --buildtype=$<CONFIG>
         "--channel=${VIEWER_CHANNEL}"
         --configuration=${CMAKE_CFG_INTDIR}
         --dest=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>
@@ -1809,7 +1809,7 @@ if (WINDOWS)
               "--fmodstudio=${USE_FMODSTUDIO}"
               "--openal=${USE_OPENAL}"
               --build=${CMAKE_CURRENT_BINARY_DIR}
-              --buildtype=$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>
+              --buildtype=$<CONFIG>
               "--channel=${VIEWER_CHANNEL}"
               --configuration=${CMAKE_CFG_INTDIR}
               --dest=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>
@@ -2042,7 +2042,7 @@ if (DARWIN)
       "--fmodstudio=${USE_FMODSTUDIO}"
       "--openal=${USE_OPENAL}"
       --build=${CMAKE_CURRENT_BINARY_DIR}
-      --buildtype=${CMAKE_BUILD_TYPE}
+      --buildtype=$<CONFIG>
       --bundleid=${MACOSX_BUNDLE_GUI_IDENTIFIER}
       "--channel=${VIEWER_CHANNEL}"
       --configuration=${CMAKE_CFG_INTDIR}
@@ -2077,7 +2077,7 @@ if (DARWIN)
               "--fmodstudio=${USE_FMODSTUDIO}"
               "--openal=${USE_OPENAL}"
               --build=${CMAKE_CURRENT_BINARY_DIR}
-              --buildtype=$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>
+              --buildtype=$<CONFIG>
               "--channel=${VIEWER_CHANNEL}"
               --configuration=${CMAKE_CFG_INTDIR}
               --dest=${VIEWER_APP_BUNDLE}
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 2b37715b9cd..0d62aeeb86b 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -435,7 +435,7 @@ def test_msvcrt_and_copy_action(self, src, dst):
             self.cmakedirs(os.path.dirname(dst))
             self.created_paths.append(dst)
             if not os.path.isdir(src):
-                if(self.args['configuration'].lower() == 'debug'):
+                if(self.args['buildtype'].lower() == 'debug'):
                     test_assembly_binding(src, "Microsoft.VC80.DebugCRT", "8.0.50727.4053")
                 else:
                     test_assembly_binding(src, "Microsoft.VC80.CRT", "8.0.50727.4053")
@@ -458,7 +458,7 @@ def test_for_no_msvcrt_manifest_and_copy_action(self, src, dst):
             self.created_paths.append(dst)
             if not os.path.isdir(src):
                 try:
-                    if(self.args['configuration'].lower() == 'debug'):
+                    if(self.args['buildtype'].lower() == 'debug'):
                         test_assembly_binding(src, "Microsoft.VC80.DebugCRT", "")
                     else:
                         test_assembly_binding(src, "Microsoft.VC80.CRT", "")
@@ -515,7 +515,7 @@ def construct(self):
 
             # Get fmodstudio dll if needed
             if self.args['fmodstudio'] == 'ON':
-                if(self.args['configuration'].lower() == 'debug'):
+                if(self.args['buildtype'].lower() == 'debug'):
                     self.path("fmodL.dll")
                 else:
                     self.path("fmod.dll")
@@ -1045,7 +1045,7 @@ def path_optional(src, dst):
 
                 # Fmod studio dylibs (vary based on configuration)
                 if self.args['fmodstudio'] == 'ON':
-                    if self.args['configuration'].lower() == 'debug':
+                    if self.args['buildtype'].lower() == 'debug':
                         for libfile in (
                                     "libfmodL.dylib",
                                     ):
-- 
GitLab