Commit 6f2dc715 authored by Ghislain MARY's avatar Ghislain MARY

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

parent 26f1e0b7
......@@ -238,6 +238,13 @@ if(ENABLE_VIDEO)
endif()
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(EXPORT_TARGETS_NAME "LinphoneBuilder")
else()
set(EXPORT_TARGETS_NAME "Linphone")
endif()
add_subdirectory(coreapi)
add_subdirectory(share)
if(ENABLE_CONSOLE_UI)
......@@ -262,9 +269,8 @@ write_basic_package_version_file(
VERSION ${LINPHONE_VERSION}
COMPATIBILITY AnyNewerVersion
)
export(EXPORT LinphoneTargets
export(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/LinphoneTargets.cmake"
NAMESPACE BelledonneCommunications::
)
configure_file(cmake/LinphoneConfig.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/LinphoneConfig.cmake"
......@@ -272,9 +278,8 @@ configure_file(cmake/LinphoneConfig.cmake.in
)
set(ConfigPackageLocation lib/cmake/Linphone)
install(EXPORT LinphoneTargets
install(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE LinphoneTargets.cmake
NAMESPACE BelledonneCommunications::
DESTINATION ${ConfigPackageLocation}
)
install(FILES
......
......@@ -41,7 +41,7 @@ endif()
get_filename_component(LINPHONE_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(LINPHONE_INCLUDE_DIRS "${LINPHONE_CMAKE_DIR}/../../../include")
set(LINPHONE_LIBRARIES BelledonneCommunications::linphone)
set(LINPHONE_LIBRARIES linphone)
set(LINPHONE_LDFLAGS @LINK_FLAGS@)
list(APPEND LINPHONE_INCLUDE_DIRS ${MEDIASTREAMER2_INCLUDE_DIRS} ${BELLESIP_INCLUDE_DIRS})
list(APPEND LINPHONE_LIBRARIES ${MEDIASTREAMER2_LIBRARIES} ${BELLESIP_LIBRARIES})
......
......@@ -188,7 +188,7 @@ if(ICONV_FOUND)
endif()
endif()
install(TARGETS linphone EXPORT LinphoneTargets
install(TARGETS linphone 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