Commit 4283de0a authored by Ghislain MARY's avatar Ghislain MARY

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

parent 51981434
......@@ -450,6 +450,13 @@ add_definitions(-DHAVE_CONFIG_H)
add_definitions(${ORTP_CPPFLAGS})
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(EXPORT_TARGETS_NAME "LinphoneBuilder")
else()
set(EXPORT_TARGETS_NAME "Mediastreamer2")
endif()
if(ENABLE_DOC)
add_subdirectory(help)
endif()
......@@ -469,9 +476,8 @@ write_basic_package_version_file(
VERSION ${MEDIASTREAMER_VERSION}
COMPATIBILITY AnyNewerVersion
)
export(EXPORT Mediastreamer2Targets
export(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/Mediastreamer2Targets.cmake"
NAMESPACE BelledonneCommunications::
)
configure_file(cmake/Mediastreamer2Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/Mediastreamer2Config.cmake"
......@@ -479,9 +485,8 @@ configure_file(cmake/Mediastreamer2Config.cmake.in
)
set(ConfigPackageLocation lib/cmake/Mediastreamer2)
install(EXPORT Mediastreamer2Targets
install(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE Mediastreamer2Targets.cmake
NAMESPACE BelledonneCommunications::
DESTINATION ${ConfigPackageLocation}
)
install(FILES
......
......@@ -49,11 +49,10 @@ endif()
get_filename_component(MEDIASTREAMER2_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(MEDIASTREAMER2_INCLUDE_DIRS "${EP_ms2_INCLUDE_DIR}")
set(MEDIASTREAMER2_LIBRARIES mediastreamer_base mediastreamer_voip)
else()
set(MEDIASTREAMER2_INCLUDE_DIRS "${MEDIASTREAMER2_CMAKE_DIR}/../../../include")
set(MEDIASTREAMER2_LIBRARIES BelledonneCommunications::mediastreamer_base BelledonneCommunications::mediastreamer_voip)
endif()
set(MEDIASTREAMER2_LIBRARIES mediastreamer_base mediastreamer_voip)
list(APPEND MEDIASTREAMER2_INCLUDE_DIRS ${ORTP_INCLUDE_DIRS})
list(APPEND MEDIASTREAMER2_LIBRARIES ${ORTP_LIBRARIES})
if(BZRTP_FOUND)
......
......@@ -96,7 +96,7 @@ else()
endif()
endif()
install(TARGETS mediastreamer_base EXPORT Mediastreamer2Targets
install(TARGETS mediastreamer_base EXPORT ${EXPORT_TARGETS_NAME}Targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
......@@ -457,7 +457,7 @@ if(NOT "${LINK_FLAGS_STR}" STREQUAL "")
set_target_properties(mediastreamer_voip PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
endif()
install(TARGETS mediastreamer_voip EXPORT Mediastreamer2Targets
install(TARGETS mediastreamer_voip 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