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

This commit is contained in:
Ghislain MARY 2015-10-13 11:28:29 +02:00
parent 26f1e0b7b9
commit 6f2dc7153d
3 changed files with 11 additions and 6 deletions

View file

@ -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

View file

@ -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})

View file

@ -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