Commit c9e60388 authored by Ghislain MARY's avatar Ghislain MARY

Change CMake export name when grouping projects with the linphone-cmake-builder.

parent fbb27d34
......@@ -187,6 +187,13 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
endif()
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(EXPORT_TARGETS_NAME "LinphoneBuilder")
else()
set(EXPORT_TARGETS_NAME "BelleSIP")
endif()
add_subdirectory(include)
add_subdirectory(src)
......@@ -203,9 +210,8 @@ write_basic_package_version_file(
VERSION ${PACKAGE_VERSION}
COMPATIBILITY AnyNewerVersion
)
export(EXPORT BelleSIPTargets
export(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/BelleSIPTargets.cmake"
NAMESPACE BelledonneCommunications::
)
configure_file(cmake/BelleSIPConfig.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/BelleSIPConfig.cmake"
......@@ -213,9 +219,8 @@ configure_file(cmake/BelleSIPConfig.cmake.in
)
set(ConfigPackageLocation lib/cmake/BelleSIP)
install(EXPORT BelleSIPTargets
install(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE BelleSIPTargets.cmake
NAMESPACE BelledonneCommunications::
DESTINATION ${ConfigPackageLocation}
)
install(FILES
......
......@@ -43,11 +43,10 @@ endif()
get_filename_component(BELLESIP_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(BELLESIP_INCLUDE_DIRS "${EP_bellesip_INCLUDE_DIR}")
set(BELLESIP_LIBRARIES bellesip)
else()
set(BELLESIP_INCLUDE_DIRS "${BELLESIP_CMAKE_DIR}/../../../include")
set(BELLESIP_LIBRARIES BelledonneCommunications::bellesip)
endif()
set(BELLESIP_LIBRARIES bellesip)
set(BELLESIP_LDFLAGS @LINK_FLAGS@)
if(TUNNEL_FOUND)
list(APPEND BELLESIP_INCLUDE_DIRS ${TUNNEL_INCLUDE_DIRS})
......
......@@ -167,7 +167,7 @@ endif()
target_include_directories(bellesip PUBLIC ${INCLUDES})
target_link_libraries(bellesip ${LIBS})
install(TARGETS bellesip EXPORT BelleSIPTargets
install(TARGETS bellesip EXPORT ${EXPORT_TARGETS_NAME}Targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
......
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