From 7727eeb4bab1f4e749447b7451f3dca4b55e3912 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Thu, 12 Jan 2017 10:48:17 +0100 Subject: [PATCH] move vcard declaration on top of cmake to workaround a cmake builder issue. --- CMakeLists.txt | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d0dd35d0..a0d204fe8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,6 +102,20 @@ endif() # find_package should be invoked here to check for libraries - however do NOT # call include_directories here (see below) +if (ENABLE_VCARD) + if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS) + include("${EP_belcard_CONFIG_DIR}/BelcardConfig.cmake") + else() + find_package(Belcard) + endif() + if(NOT BELCARD_FOUND) + message(WARNING "Could not find the belcard library!") + set(ENABLE_VCARD OFF CACHE BOOL "Enable vcard support." FORCE) + else() + add_definitions(-DVCARD_ENABLED) + endif() +endif() + if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS) include("${EP_bellesip_CONFIG_DIR}/BelleSIPConfig.cmake") include("${EP_ms2_CONFIG_DIR}/Mediastreamer2Config.cmake") @@ -166,19 +180,6 @@ endif() if(ENABLE_LIME) set(HAVE_LIME 1) endif() -if (ENABLE_VCARD) - if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS) - include("${EP_belcard_CONFIG_DIR}/BelcardConfig.cmake") - else() - find_package(Belcard) - endif() - if(NOT BELCARD_FOUND) - message(WARNING "Could not find the belcard library!") - set(ENABLE_VCARD OFF CACHE BOOL "Enable vcard support." FORCE) - else() - add_definitions(-DVCARD_ENABLED) - endif() -endif() if(UNIX AND NOT APPLE) include(CheckIncludeFiles)