diff options
-rw-r--r-- | cmake/cpack.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/cpack.cmake b/cmake/cpack.cmake index b46f8b1..3c4af72 100644 --- a/cmake/cpack.cmake +++ b/cmake/cpack.cmake @@ -1,6 +1,13 @@ INCLUDE(InstallRequiredSystemLibraries) string(REPLACE "." ";" VERSION_LIST ${ACCEL_PPP_VERSION}) + +# Verify if VERSION_LIST has 3 elements +# If not assign dummy variables +list(LENGTH VERSION_LIST VERSION_LIST_LENGTH) +if(NOT VERSION_LIST_LENGTH EQUAL 3) + set(VERSION_LIST 1;12;0) +endif() list(GET VERSION_LIST 0 CPACK_PACKAGE_VERSION_MAJOR) list(GET VERSION_LIST 1 CPACK_PACKAGE_VERSION_MINOR) list(GET VERSION_LIST 2 CPACK_PACKAGE_VERSION_PATCH) |