From 6df439595309bdffdc0dd4c1d2b4dc7bc2968bce Mon Sep 17 00:00:00 2001 From: Denys Fedoryshchenko Date: Sun, 30 Apr 2023 17:40:54 +0300 Subject: Fix compile failure with cmake failing on forks, fixes issue #80 We set fake variables so recipe doesn't fail. It is a bit of hack for such situation, but makes development easier. Signed-off-by: Denys Fedoryshchenko --- cmake/cpack.cmake | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cmake') diff --git a/cmake/cpack.cmake b/cmake/cpack.cmake index b46f8b14..81bc714f 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 git;git;git) +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) -- cgit v1.2.3