Commit 97ed671a authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Updated cmake files for belcard

parent 3695a153
......@@ -172,7 +172,11 @@ if(ENABLE_LIME)
set(HAVE_LIME 1)
endif()
if (ENABLE_VCARD)
find_package(Belcard)
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)
......
......@@ -41,7 +41,7 @@ if(BELCARD_INCLUDE_DIRS)
endif()
find_library(BELCARD_LIBRARIES
NAMES belr belcard
NAMES belcard
HINTS ${_BELCARD_ROOT_PATHS}
PATH_SUFFIXES bin lib
)
......
......@@ -38,6 +38,13 @@ find_package(BelleSIP REQUIRED)
if(@ENABLE_TUNNEL@)
find_package(Tunnel)
endif()
if(@ENABLE_VCARD@)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_belcard_CONFIG_DIR}/BelcardConfig.cmake")
else()
find_package(Belcard)
endif()
endif()
get_filename_component(LINPHONE_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(LINPHONE_INCLUDE_DIRS "${LINPHONE_CMAKE_DIR}/../../../include")
......@@ -51,4 +58,8 @@ if(TUNNEL_FOUND)
list(APPEND LINPHONE_INCLUDE_DIRS ${TUNNEL_INCLUDE_DIRS})
list(APPEND LINPHONE_LIBRARIES ${TUNNEL_LIBRARIES})
endif()
if(BELCARD_FOUND)
list(APPEND LINPHONE_INCLUDE_DIRS ${BELCARD_INCLUDE_DIRS})
list(APPEND LINPHONE_LIBRARIES ${BELCARD_LIBRARIES})
endif()
set(LINPHONE_FOUND 1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment