diff options
author | Clément Bénier <clement.benier@iot.bzh> | 2019-06-03 09:50:07 +0200 |
---|---|---|
committer | Clément Bénier <clement.benier@iot.bzh> | 2019-06-03 09:51:30 +0200 |
commit | 638d42990bf55e33b3a20d4eef562208240b3530 (patch) | |
tree | 65ff84734c4d742c88d7c1469f1ca88ecf6fdcd8 | |
parent | 85b24c108f8080418664878bbc5d7aa37b5f1509 (diff) |
02-variables.cmake: project options for 3.12.4sandbox/benierc/wip
both HOMEPAGE_URL and DESCRIPTION are only available in 3.12.4
Change-Id: I2fcf30c3f59464bb16e362f43ae032a7160638ac
Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
-rw-r--r-- | src/cmake/cmake.d/02-variables.cmake | 10 |
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") |