summaryrefslogtreecommitdiff
path: root/Modules/BasicConfigVersion-SameMajorVersion.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/BasicConfigVersion-SameMajorVersion.cmake.in')
-rw-r--r--Modules/BasicConfigVersion-SameMajorVersion.cmake.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in
index dc04e54cd0..cf73f603d4 100644
--- a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in
+++ b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in
@@ -17,6 +17,9 @@ else()
if("@CVF_VERSION@" MATCHES "^([0-9]+)\\.")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
+ if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
+ string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
+ endif()
else()
set(CVF_VERSION_MAJOR "@CVF_VERSION@")
endif()