From 444ca98cbfd4ab5da5b921f6b45cf21968c80b4e Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Tue, 30 Jul 2024 15:15:23 -0400 Subject: [PATCH] build(cmake): set CMAKE_PROJECT_VERSION from PROJECT_VERSION (#2936) --- cmake/prep/build_version.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/prep/build_version.cmake b/cmake/prep/build_version.cmake index 56a4eddafcf..5457fed1b01 100644 --- a/cmake/prep/build_version.cmake +++ b/cmake/prep/build_version.cmake @@ -4,6 +4,7 @@ if((DEFINED ENV{BRANCH}) AND (DEFINED ENV{BUILD_VERSION}) AND (DEFINED ENV{COMMI # If BRANCH is "master" and BUILD_VERSION is not empty, then we are building a master branch MESSAGE("Got from CI master branch and version $ENV{BUILD_VERSION}") set(PROJECT_VERSION $ENV{BUILD_VERSION}) + set(CMAKE_PROJECT_VERSION ${PROJECT_VERSION}) # cpack will use this to set the binary versions elseif((DEFINED ENV{BRANCH}) AND (DEFINED ENV{COMMIT})) # If BRANCH is set but not BUILD_VERSION we are building a PR, we gather only the commit hash MESSAGE("Got from CI $ENV{BRANCH} branch and commit $ENV{COMMIT}")