summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bénier <clement.benier@iot.bzh>2019-06-03 09:50:07 +0200
committerClément Bénier <clement.benier@iot.bzh>2019-06-04 10:26:15 +0200
commit1e0f297f4a3f4ac13d704d8926a71adf6331c766 (patch)
treeb45bf0eb21ef93e067b913e5b41d64fd864b20b7
parent3490ab7e6fc57edb8c94f2ec4b2c94b14a60b953 (diff)
02-variables.cmake: project options for 3.12.4
both HOMEPAGE_URL and DESCRIPTION are only available in 3.12.4 BUG-AGL: SPEC-2464 Change-Id: I2fcf30c3f59464bb16e362f43ae032a7160638ac Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
-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..69c7b6a 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_EQUAL 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")