Commit 8eee0095 authored by Ghislain MARY's avatar Ghislain MARY

Allow inclusion of CMake project in a global CMake project.

parent 67fd090c
......@@ -128,7 +128,11 @@ check_library_exists("dl" "dlopen" "" HAVE_DLOPEN)
include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
find_package(ORTP REQUIRED)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_ortp_CONFIG_DIR}/ORTPConfig.cmake")
else()
find_package(ORTP REQUIRED)
endif()
find_package(PolarSSL)
find_package(PCAP QUIET)
......
......@@ -29,15 +29,24 @@
# MEDIASTREAMER2_CPPFLAGS - The compilation flags needed to use mediastreamer2
# MEDIASTREAMER2_LDFLAGS - The linking flags needed to use mediastreamer2
include("${CMAKE_CURRENT_LIST_DIR}/Mediastreamer2Targets.cmake")
find_package(ORTP REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/Mediastreamer2Targets.cmake" OPTIONAL)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_ortp_CONFIG_DIR}/ORTPConfig.cmake")
else()
find_package(ORTP REQUIRED)
endif()
if(@ENABLE_ZRTP@)
find_package(BZRTP)
endif()
get_filename_component(MEDIASTREAMER2_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(MEDIASTREAMER2_INCLUDE_DIRS "${MEDIASTREAMER2_CMAKE_DIR}/../../../include")
set(MEDIASTREAMER2_LIBRARIES BelledonneCommunications::mediastreamer_base BelledonneCommunications::mediastreamer_voip)
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()
list(APPEND MEDIASTREAMER2_INCLUDE_DIRS ${ORTP_INCLUDE_DIRS})
list(APPEND MEDIASTREAMER2_LIBRARIES ${ORTP_LIBRARIES})
if(BZRTP_FOUND)
......
......@@ -36,7 +36,7 @@ if(DOXYGEN_FOUND)
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile ${DOC_INPUT_FILES}
)
add_custom_target(html-doc ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/doc/html/index.html")
add_custom_target(ms2-html-doc ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/doc/html/index.html")
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc/html"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/mediastreamer2-${MEDIASTREAMER_VERSION}")
else()
......
......@@ -56,4 +56,3 @@ target_link_libraries(mkvstream mediastreamer_voip mediastreamer_base)
install(TARGETS mediastream mkvstream
RUNTIME DESTINATION bin
)
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