Skip to content

Commit

Permalink
CMake: use XRAY build ID as CMAKE_PROJECT_VERSION_TWEAK
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Feb 7, 2024
1 parent a2e6f06 commit 52c3e2e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
18 changes: 9 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ message(STATUS "CMAKE_VERSION: ${CMAKE_VERSION}")
cmake_policy(SET CMP0048 NEW)
cmake_policy(SET CMP0095 NEW)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

include(utils)
calculate_xray_build_id(XRAY_BUILD_ID)

project(OpenXRay
DESCRIPTION "OpenXRay is an improved version of the X-Ray Engine, \
the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World."
VERSION 1.6.02
the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World."
VERSION 1.6.02.${XRAY_BUILD_ID}
HOMEPAGE_URL "https://github.com/OpenXRay/xray-16"
LANGUAGES CXX C
)
message(STATUS "CMAKE_PROJECT_VERSION: ${}")

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Expand All @@ -33,13 +39,7 @@ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
endif()

include(GNUInstallDirs)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

include(utils)

calculate_xray_build_id(XRAY_BUILD_ID)
message(STATUS "XRAY_BUILD_ID: ${XRAY_BUILD_ID}")
include(packaging)

set_git_info()

Expand Down
2 changes: 0 additions & 2 deletions cmake/utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,3 @@ function(calculate_xray_build_id output)
# Set requested variable
set(${output} ${build_id} PARENT_SCOPE)
endfunction()

include(packaging)

0 comments on commit 52c3e2e

Please sign in to comment.