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

Fix build with CMake (MS2 -> Mediastreamer2).

parent dfb58154
......@@ -36,8 +36,6 @@ set(VERSION "${PACKAGE_VERSION}")
option(ENABLE_TESTS "Enable compilation of the tests." No)
option(ENABLE_MSPLUGIN "Enable compilation of the mediastreamer2 plugin." Yes)
set(WITH_MS2 "${CMAKE_INSTALL_PREFIX}" CACHE STRING "Set prefix where the mediastreamer libraries can be found (ex:/usr or /usr/local)")
set(WITH_ORTP "${CMAKE_INSTALL_PREFIX}" CACHE STRING "Set prefix where the oRTP library can be found (ex:/usr or /usr/local)")
if(MSVC)
......@@ -45,8 +43,6 @@ if(MSVC)
endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_PREFIX_PATH}/share/cmake/Modules)
include(CheckIncludeFile)
check_include_file("dlfcn.h" HAVE_DLFCN_H)
check_include_file("inttypes.h" HAVE_INTTYPES_H)
......@@ -60,11 +56,10 @@ check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
check_include_file("unistd.h" HAVE_UNISTD_H)
if(ENABLE_MSPLUGIN)
find_package(ORTP)
find_package(MS2)
find_package(Mediastreamer2)
if(NOT (ORTP_FOUND AND MS2_FOUND))
message(WARNING "Could not find the oRTP and/or mediastreamer2 libraries!")
if(NOT MEDIASTREAMER2_FOUND)
message(WARNING "Could not find the mediastreamer2 libraries!")
set(ENABLE_MSPLUGIN OFF CACHE BOOL "Enable compilation of the mediastreamer2 plugin." FORCE)
endif()
endif()
......
......@@ -25,7 +25,7 @@ set(SOURCE_FILES
bcg729_enc.c
)
include_directories(${MS2_INCLUDE_DIRS})
include_directories(${MEDIASTREAMER2_INCLUDE_DIRS})
add_library(msbcg729 SHARED ${BCG729_SOURCE_FILES} ${SOURCE_FILES})
set_target_properties(msbcg729 PROPERTIES VERSION ${PACKAGE_VERSION} SOVERSION 0)
......@@ -38,7 +38,7 @@ if(MSVC)
endif()
set_target_properties(msbcg729 PROPERTIES PREFIX "lib")
endif()
target_link_libraries(msbcg729 ${MS2_LIBRARIES} ${ORTP_LIBRARIES})
target_link_libraries(msbcg729 ${MEDIASTREAMER2_LIBRARIES})
install(TARGETS msbcg729
RUNTIME DESTINATION lib/mediastreamer/plugins
......
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