Skip to content

Commit 52c3e2e

Browse files
committed
CMake: use XRAY build ID as CMAKE_PROJECT_VERSION_TWEAK
1 parent a2e6f06 commit 52c3e2e

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@ message(STATUS "CMAKE_VERSION: ${CMAKE_VERSION}")
55
cmake_policy(SET CMP0048 NEW)
66
cmake_policy(SET CMP0095 NEW)
77

8+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
9+
10+
include(utils)
11+
calculate_xray_build_id(XRAY_BUILD_ID)
12+
813
project(OpenXRay
914
DESCRIPTION "OpenXRay is an improved version of the X-Ray Engine, \
10-
the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World."
11-
VERSION 1.6.02
15+
the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World."
16+
VERSION 1.6.02.${XRAY_BUILD_ID}
1217
HOMEPAGE_URL "https://github.com/OpenXRay/xray-16"
1318
LANGUAGES CXX C
1419
)
20+
message(STATUS "CMAKE_PROJECT_VERSION: ${}")
1521

1622
set(CMAKE_CXX_STANDARD 17)
1723
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
@@ -33,13 +39,7 @@ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
3339
endif()
3440

3541
include(GNUInstallDirs)
36-
37-
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
38-
39-
include(utils)
40-
41-
calculate_xray_build_id(XRAY_BUILD_ID)
42-
message(STATUS "XRAY_BUILD_ID: ${XRAY_BUILD_ID}")
42+
include(packaging)
4343

4444
set_git_info()
4545

cmake/utils.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,3 @@ function(calculate_xray_build_id output)
113113
# Set requested variable
114114
set(${output} ${build_id} PARENT_SCOPE)
115115
endfunction()
116-
117-
include(packaging)

0 commit comments

Comments
 (0)