Commit 17fad900 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

build system: Fix the "08" version number looks like an octal number issue

parent b84bda99
Pipeline #219853 skipped
......@@ -7,9 +7,15 @@ set (RELEASE_SERVICE_VERSION_MICRO "0")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
project(KTorrent VERSION ${RELEASE_SERVICE_VERSION})
# We want RELEASE_SERVICE_VERSION_MINOR to have 08 but the integer define can't have a leading 0 since otherwise it's considered octal
# So strip a leading 0 if found in RELEASE_SERVICE_VERSION_MINOR and store the result in RELEASE_SERVICE_VERSION_MINOR_INT
string(REGEX REPLACE "^0?(.+)$" "\\1" RELEASE_SERVICE_VERSION_MINOR_INT "${RELEASE_SERVICE_VERSION_MINOR}")
add_definitions(-D'VERSION="${RELEASE_SERVICE_VERSION}"'
-D'VERSION_MAJOR=${RELEASE_SERVICE_VERSION_MAJOR}'
-D'VERSION_MINOR=${RELEASE_SERVICE_VERSION_MINOR}'
-D'VERSION_MINOR=${RELEASE_SERVICE_VERSION_MINOR_INT}'
-D'VERSION_MICRO=${RELEASE_SERVICE_VERSION_MICRO}')
set (QT_MIN_VERSION "5.15.0")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment