diff options
-rw-r--r-- | src/cmake/cmake.d/02-variables.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmake/cmake.d/02-variables.cmake b/src/cmake/cmake.d/02-variables.cmake index 951a681..4ced24e 100644 --- a/src/cmake/cmake.d/02-variables.cmake +++ b/src/cmake/cmake.d/02-variables.cmake @@ -81,9 +81,9 @@ execute_process(COMMAND git status --short # Include project configuration # ------------------------------ -if(NOT DEFINED PROJECT_VERSION AND NOT DEFINED GIT_PROJECT_VERSION) - message(FATAL_ERROR "${Red}No version tag found from your project's source directory and no PROJECT_VERSION set in your config.cmake file. Abort!") -elseif(NOT DEFINED PROJECT_VERSION AND DEFINED GIT_PROJECT_VERSION) +if(NOT PROJECT_VERSION AND NOT GIT_PROJECT_VERSION) + message(FATAL_ERROR "${Red}No version tag found from your project's source directory and no PROJECT_VERSION set in your config.cmake file. Please set a version tag or cmake variable in your config.cmake. Abort!") +elseif(NOT PROJECT_VERSION AND GIT_PROJECT_VERSION) set(PROJECT_VERSION ${GIT_PROJECT_VERSION}) endif() |