From e3ba05fb78f0c1c8aa7a7b6d85ea58bc7e110821 Mon Sep 17 00:00:00 2001 From: Clément Bénier Date: Mon, 3 Jun 2019 09:50:07 +0200 Subject: 02-variables.cmake: project options for 3.12.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/cmake/cmake.d/02-variables.cmake | 10 +++++++--- 1 file 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") -- cgit 1.2.3-korg