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:25:50 +0200
commite3ba05fb78f0c1c8aa7a7b6d85ea58bc7e110821 (patch)
tree1ec5f1e5050c293acca707f5334d55f181324de4
parent7e382f2ddb849d7c0c120031aa7f39598e66f182 (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")