Browse Source

Don't use user-supplied VERSION_NUM when building DevilutionX (#7411)

pull/7415/head
Andrew James 2 years ago committed by GitHub
parent
commit
a0171b1b5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      CMakeLists.txt

10
CMakeLists.txt

@ -47,12 +47,10 @@ include(VcPkgManifestFeatures)
# 1. Properties such as `TARGET_SUPPORTS_SHARED_LIBS` are defined.
# 2. Toolchain file is evaluated, required for `Platforms.cmake`,
# which can override the options.
if(NOT VERSION_NUM)
file(STRINGS "VERSION" VERSION_STR)
if(NOT "${VERSION_STR}" STREQUAL "")
string(REGEX MATCH "([0-9]+\\.[0-9]+\\.[0-9]+)(.*)?" VERSION_PREFIX ${VERSION_STR})
set(VERSION_NUM ${CMAKE_MATCH_1})
endif()
file(STRINGS "VERSION" VERSION_STR)
if(NOT "${VERSION_STR}" STREQUAL "")
string(REGEX MATCH "([0-9]+\\.[0-9]+\\.[0-9]+).*" VERSION_PREFIX ${VERSION_STR})
set(VERSION_NUM ${CMAKE_MATCH_1})
endif()
if(NOT VERSION_SUFFIX)

Loading…
Cancel
Save