Commit 4c9fc953 authored by Ghislain MARY's avatar Ghislain MARY

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

parent 4b27c68d
......@@ -81,6 +81,13 @@ if(MSVC)
endif()
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(EXPORT_TARGETS_NAME "LinphoneBuilder")
else()
set(EXPORT_TARGETS_NAME "BZRTP")
endif()
add_subdirectory(include)
add_subdirectory(src)
if(ENABLE_TESTS)
......@@ -95,9 +102,8 @@ write_basic_package_version_file(
VERSION ${BZRTP_VERSION}
COMPATIBILITY AnyNewerVersion
)
export(EXPORT BZRTPTargets
export(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/BZRTPTargets.cmake"
NAMESPACE BelledonneCommunications::
)
configure_file(cmake/BZRTPConfig.cmake
"${CMAKE_CURRENT_BINARY_DIR}/BZRTPConfig.cmake"
......@@ -105,9 +111,8 @@ configure_file(cmake/BZRTPConfig.cmake
)
set(ConfigPackageLocation lib/cmake/BZRTP)
install(EXPORT BZRTPTargets
install(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE BZRTPTargets.cmake
NAMESPACE BelledonneCommunications::
DESTINATION ${ConfigPackageLocation}
)
install(FILES
......
......@@ -34,9 +34,8 @@ endif()
get_filename_component(BZRTP_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(BZRTP_INCLUDE_DIRS "${EP_bzrtp_INCLUDE_DIR}")
set(BZRTP_LIBRARIES bzrtp)
else()
set(BZRTP_INCLUDE_DIRS "${BZRTP_CMAKE_DIR}/../../../include")
set(BZRTP_LIBRARIES BelledonneCommunications::bzrtp)
endif()
set(BZRTP_LIBRARIES bzrtp)
set(BZRTP_FOUND 1)
......@@ -47,7 +47,7 @@ else()
endif()
endif()
install(TARGETS bzrtp EXPORT BZRTPTargets
install(TARGETS bzrtp 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