diff options
Diffstat (limited to 'Modules/BasicConfigVersion-SameMajorVersion.cmake.in')
-rw-r--r-- | Modules/BasicConfigVersion-SameMajorVersion.cmake.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in index dc04e54..cf73f60 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() |