build: Rename PACKAGE_* variables to CLIENT_*

The use of `PACKAGE_NAME` for the project's variable name is
problematic, as this name is commonly used in CMake's interface
variables. If third-party CMake code handles with scopes improperly,
our `PACKAGE_NAME` variable could end up with an unexpected value.

This change avoids such conflicts by renaming all `PACKAGE_*` variables
to `CLIENT_*`.
This commit is contained in:
Hennadii Stepanov committed 2024-10-28 12:35:55 +00:00
1 parent e6e29e3c94
commit 332655cb52
8 files changed
+38 -38

No files matched your search

+5 -5
View File
@@ -16,7 +16,7 @@ endif()
#=============================
# Project / Package metadata
#=============================
set(PACKAGE_NAME "Bitcoin Core")
set(CLIENT_NAME "Bitcoin Core")
set(CLIENT_VERSION_MAJOR 28)
set(CLIENT_VERSION_MINOR 99)
set(CLIENT_VERSION_BUILD 0)
@@ -47,14 +47,14 @@ project(BitcoinCore
LANGUAGES NONE
)
set(PACKAGE_VERSION ${PROJECT_VERSION})
set(CLIENT_VERSION_STRING ${PROJECT_VERSION})
if(CLIENT_VERSION_RC GREATER 0)
string(APPEND PACKAGE_VERSION "rc${CLIENT_VERSION_RC}")
string(APPEND CLIENT_VERSION_STRING "rc${CLIENT_VERSION_RC}")
endif()
set(COPYRIGHT_HOLDERS "The %s developers")
set(COPYRIGHT_HOLDERS_FINAL "The ${PACKAGE_NAME} developers")
set(PACKAGE_BUGREPORT "https://github.com/bitcoin/bitcoin/issues")
set(COPYRIGHT_HOLDERS_FINAL "The ${CLIENT_NAME} developers")
set(CLIENT_BUGREPORT "https://github.com/bitcoin/bitcoin/issues")
#=============================
# Language setup