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)