summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/cmake/BuildVersion.cmake9
-rw-r--r--indra/newview/CMakeLists.txt30
-rw-r--r--indra/newview/llappdelegate-objc.mm2
-rw-r--r--indra/newview/llappviewerwin32.cpp2
-rw-r--r--indra/newview/llversioninfo.cpp2
-rw-r--r--indra/newview/llversioninfovars.h.in31
-rw-r--r--indra/newview/tests/llversioninfo_test.cpp2
7 files changed, 43 insertions, 35 deletions
diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake
index aa151bafc8..6939f9a4da 100644
--- a/indra/cmake/BuildVersion.cmake
+++ b/indra/cmake/BuildVersion.cmake
@@ -46,13 +46,4 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n
message(STATUS "Ultimate fallback, revision was blank or not set: will use 0")
set(VIEWER_VERSION_REVISION 0)
endif ("${VIEWER_VERSION_REVISION}" STREQUAL "")
-
- set(VIEWER_CHANNEL_VERSION_DEFINES
- "LL_VIEWER_CHANNEL=${VIEWER_CHANNEL}"
- "LL_VIEWER_VERSION_MAJOR=${VIEWER_VERSION_MAJOR}"
- "LL_VIEWER_VERSION_MINOR=${VIEWER_VERSION_MINOR}"
- "LL_VIEWER_VERSION_PATCH=${VIEWER_VERSION_PATCH}"
- "LL_VIEWER_VERSION_BUILD=${VIEWER_VERSION_REVISION}"
- "LLBUILD_CONFIG=\"${CMAKE_BUILD_TYPE}\""
- )
endif (NOT DEFINED VIEWER_SHORT_VERSION)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index d580114099..211d51ec15 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -77,6 +77,8 @@ if (HAVOK)
endif()
endif ()
+configure_file(llversioninfovars.h.in llversioninfovars.h @ONLY)
+
set(viewer_SOURCE_FILES
gltfscenemanager.cpp
gltf/asset.cpp
@@ -1422,12 +1424,6 @@ source_group("CMake Rules" FILES ViewerInstall.cmake)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt"
"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}\n")
-set_source_files_properties(
- llversioninfo.cpp tests/llversioninfo_test.cpp
- PROPERTIES
- COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake
- )
-
if (DARWIN)
LIST(APPEND viewer_SOURCE_FILES llappviewermacosx.cpp)
LIST(APPEND viewer_SOURCE_FILES llappviewermacosx-objc.mm)
@@ -1453,7 +1449,6 @@ if (DARWIN)
llappdelegate-objc.mm
PROPERTIES
SKIP_PRECOMPILE_HEADERS TRUE
- COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}"
# BugsplatMac is a module, imported with @import. That language feature
# demands these -f switches.
# Xcode 10.2 requires that Objective-C++ headers declare nullability of
@@ -1482,13 +1477,6 @@ endif (DARWIN)
if (LINUX)
LIST(APPEND viewer_SOURCE_FILES llappviewerlinux.cpp)
- set_source_files_properties(
- llappviewerlinux.cpp
- PROPERTIES
- COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}"
- )
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
-
endif (LINUX)
if (WINDOWS)
@@ -1497,11 +1485,6 @@ if (WINDOWS)
llappviewerwin32.cpp
llwindebug.cpp
)
- set_source_files_properties(
- llappviewerwin32.cpp
- PROPERTIES
- COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}"
- )
list(APPEND viewer_HEADER_FILES
llappviewerwin32.h
@@ -1719,13 +1702,6 @@ if (WINDOWS)
list(APPEND viewer_SOURCE_FILES ${viewer_INSTALLER_FILES})
endif (WINDOWS)
-if( DEFINED LLSTARTUP_COMPILE_FLAGS )
- # progress view disables/enables icons based on available packages
- set_source_files_properties(llprogressview.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}")
-
- set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}")
-endif()
-
list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES})
add_executable(${VIEWER_BINARY_NAME}
@@ -1734,6 +1710,8 @@ add_executable(${VIEWER_BINARY_NAME}
${viewer_SOURCE_FILES}
)
+target_include_directories(${VIEWER_BINARY_NAME} PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
+
# add package files
file(GLOB EVENT_HOST_SCRIPT_GLOB_LIST
${CMAKE_CURRENT_SOURCE_DIR}/../viewer_components/*.py)
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index af18dca185..6073b19aa8 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -37,6 +37,8 @@
#include "llappviewermacosx-for-objc.h"
#include <Carbon/Carbon.h> // Used for Text Input Services ("Safe" API - it's supported)
+#include "llversioninfovars.h"
+
@implementation LLAppDelegate
@synthesize window;
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index a951338138..e55836fd02 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -72,6 +72,8 @@
#include <fstream>
#include <exception>
+#include "llversioninfovars.h"
+
// Bugsplat (http://bugsplat.com) crash reporting tool
#ifdef LL_BUGSPLAT
#include "BugSplat.h"
diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp
index 4e8320b72a..cbd63184e9 100644
--- a/indra/newview/llversioninfo.cpp
+++ b/indra/newview/llversioninfo.cpp
@@ -32,6 +32,8 @@
#include "llversioninfo.h"
#include "stringize.h"
+#include "llversioninfovars.h"
+
#if ! defined(LL_VIEWER_CHANNEL) \
|| ! defined(LL_VIEWER_VERSION_MAJOR) \
|| ! defined(LL_VIEWER_VERSION_MINOR) \
diff --git a/indra/newview/llversioninfovars.h.in b/indra/newview/llversioninfovars.h.in
new file mode 100644
index 0000000000..fe834406e6
--- /dev/null
+++ b/indra/newview/llversioninfovars.h.in
@@ -0,0 +1,31 @@
+/**
+ * @file llversioninfovars.h.in
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#define LL_VIEWER_CHANNEL @VIEWER_CHANNEL@
+#define LL_VIEWER_VERSION_MAJOR @VIEWER_VERSION_MAJOR@
+#define LL_VIEWER_VERSION_MINOR @VIEWER_VERSION_MINOR@
+#define LL_VIEWER_VERSION_PATCH @VIEWER_VERSION_PATCH@
+#define LL_VIEWER_VERSION_BUILD @VIEWER_VERSION_REVISION@
+#define LLBUILD_CONFIG "@CMAKE_BUILD_TYPE@"
diff --git a/indra/newview/tests/llversioninfo_test.cpp b/indra/newview/tests/llversioninfo_test.cpp
index 8049e67fc5..a78235c5f7 100644
--- a/indra/newview/tests/llversioninfo_test.cpp
+++ b/indra/newview/tests/llversioninfo_test.cpp
@@ -29,6 +29,8 @@
#include "../llversioninfo.h"
+#include "llversioninfovars.h"
+
#include <iostream>
// LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The