summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cmake/cmake.d/02-variables.cmake10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cmake/cmake.d/02-variables.cmake b/src/cmake/cmake.d/02-variables.cmake
index 8d42cd8..f43c197 100644
--- a/src/cmake/cmake.d/02-variables.cmake
+++ b/src/cmake/cmake.d/02-variables.cmake
@@ -100,10 +100,14 @@ endif()
# Release additionnals informations isn't supported so setting project
# attributes then add the dirty flag if git repo not sync'ed
-if(HOMEPAGE_URL)
- project(${PROJECT_NAME} VERSION ${PROJECT_VERSION} LANGUAGES ${PROJECT_LANGUAGES} DESCRIPTION ${PROJECT_DESCRIPTION} HOMEPAGE_URL ${PROJECT_URL})
+if(CMAKE_VERSION VERSION_GREATER 3.12.0)
+ if(HOMEPAGE_URL)
+ project(${PROJECT_NAME} VERSION ${PROJECT_VERSION} LANGUAGES ${PROJECT_LANGUAGES} DESCRIPTION ${PROJECT_DESCRIPTION} HOMEPAGE_URL ${PROJECT_URL})
+ else()
+ project(${PROJECT_NAME} VERSION ${PROJECT_VERSION} LANGUAGES ${PROJECT_LANGUAGES} DESCRIPTION ${PROJECT_DESCRIPTION})
+ endif()
else()
- project(${PROJECT_NAME} VERSION ${PROJECT_VERSION} LANGUAGES ${PROJECT_LANGUAGES} DESCRIPTION ${PROJECT_DESCRIPTION})
+ project(${PROJECT_NAME} VERSION ${PROJECT_VERSION} LANGUAGES ${PROJECT_LANGUAGES})
endif()
if(NOT ${DIRTY_FLAG})
set(PROJECT_VERSION "${PROJECT_VERSION}-${COMMIT_HASH}-dirty")