Commit 43bbb9a5 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fix belr link in cmake builder

parent 5804d855
......@@ -60,7 +60,11 @@ endif()
# find_package should be invoked here to check for libraries - however do NOT
# call include_directories here (see below)
find_package(Belr REQUIRED)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_belr_CONFIG_DIR}/BelrConfig.cmake")
else()
find_package(Belr REQUIRED)
endif()
if(ENABLE_UNIT_TESTS)
find_package(CUnit)
......@@ -134,8 +138,6 @@ if(ENABLE_UNIT_TESTS)
# add_subdirectory(tests)
endif()
include(CMakePackageConfigHelpers)
export(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/BelcardTargets.cmake"
......
......@@ -31,11 +31,23 @@ if(NOT LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${CMAKE_CURRENT_LIST_DIR}/BelcardTargets.cmake")
endif()
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_belr_CONFIG_DIR}/BelrConfig.cmake")
else()
find_package(Belr REQUIRED)
endif()
get_filename_component(BELCARD_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(BELCARD_INCLUDE_DIRS "${EP_belcard_INCLUDE_DIR}")
else()
set(BELCARD_INCLUDE_DIRS "${BELCARD_CMAKE_DIR}/../../../include")
endif()
if(BELR_FOUND)
list(APPEND BELCARD_INCLUDE_DIRS ${BELR_INCLUDE_DIRS})
list(APPEND BELCARD_LIBRARIES ${BELR_LIBRARIES})
endif()
set(BELCARD_LIBRARIES belcard)
set(BELCARD_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