Commit f7611921 authored by Ghislain MARY's avatar Ghislain MARY

Use a config-file package instead of a find-module package in CMake.

parent ca66464d
...@@ -92,8 +92,7 @@ cmake_dependent_option(ENABLE_THEORA "Enable theora video codec support." YES "E ...@@ -92,8 +92,7 @@ cmake_dependent_option(ENABLE_THEORA "Enable theora video codec support." YES "E
cmake_dependent_option(ENABLE_VPX "Build mediastreamer2 with VPX codec." YES "ENABLE_VIDEO" NO) cmake_dependent_option(ENABLE_VPX "Build mediastreamer2 with VPX codec." YES "ENABLE_VIDEO" NO)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_PREFIX_PATH}/share/cmake/Modules) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(CheckIncludeFile) include(CheckIncludeFile)
include(CheckLibraryExists) include(CheckLibraryExists)
...@@ -402,14 +401,6 @@ add_definitions(-DHAVE_CONFIG_H) ...@@ -402,14 +401,6 @@ add_definitions(-DHAVE_CONFIG_H)
add_definitions(${ORTP_CPPFLAGS}) add_definitions(${ORTP_CPPFLAGS})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FindMS2.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FindMS2.cmake @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FindMS2.cmake
DESTINATION share/cmake/Modules
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
add_subdirectory(cmake)
add_subdirectory(help) add_subdirectory(help)
add_subdirectory(include) add_subdirectory(include)
add_subdirectory(src) add_subdirectory(src)
...@@ -419,3 +410,31 @@ endif() ...@@ -419,3 +410,31 @@ endif()
if(ENABLE_TOOLS) if(ENABLE_TOOLS)
add_subdirectory(tools) add_subdirectory(tools)
endif() endif()
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/Mediastreamer2ConfigVersion.cmake"
VERSION ${MEDIASTREAMER_VERSION}
COMPATIBILITY AnyNewerVersion
)
export(EXPORT Mediastreamer2Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/Mediastreamer2Targets.cmake"
NAMESPACE BelledonneCommunications::
)
configure_file(cmake/Mediastreamer2Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/Mediastreamer2Config.cmake"
@ONLY
)
set(ConfigPackageLocation lib/cmake/Mediastreamer2)
install(EXPORT Mediastreamer2Targets
FILE Mediastreamer2Targets.cmake
NAMESPACE BelledonneCommunications::
DESTINATION ${ConfigPackageLocation}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/Mediastreamer2Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/Mediastreamer2ConfigVersion.cmake"
DESTINATION ${ConfigPackageLocation}
)
...@@ -30,7 +30,6 @@ include(CheckSymbolExists) ...@@ -30,7 +30,6 @@ include(CheckSymbolExists)
include(CMakePushCheckState) include(CMakePushCheckState)
set(_ALSA_ROOT_PATHS set(_ALSA_ROOT_PATHS
${WITH_ALSA}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
......
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
# ARTS_LIBRARIES - The libraries needed to use arts # ARTS_LIBRARIES - The libraries needed to use arts
include(CheckSymbolExists) include(CheckSymbolExists)
include(CMakePushCheckState)
set(_ARTS_ROOT_PATHS set(_ARTS_ROOT_PATHS
${WITH_ARTS}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
...@@ -49,13 +49,17 @@ find_library(ARTS_LIBRARIES ...@@ -49,13 +49,17 @@ find_library(ARTS_LIBRARIES
) )
if(ARTS_LIBRARIES) if(ARTS_LIBRARIES)
check_symbol_exists(arts_init kde/artsc/artsc.h HAVE_ARTS_INIT) cmake_push_check_state(RESET)
list(APPEND CMAKE_REQUIRED_INCLUDES ${ARTS_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_LIBRARIES ${ARTS_LIBRARIES})
check_symbol_exists(arts_init "kde/artsc/artsc.h" HAVE_ARTS_INIT)
cmake_pop_check_state()
endif() endif()
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Arts find_package_handle_standard_args(Arts
DEFAULT_MSG DEFAULT_MSG
ARTS_INCLUDE_DIRS ARTS_LIBRARIES HAVE_ARTS_INIT ARTS_INCLUDE_DIRS ARTS_LIBRARIES HAVE_KDE_ARTSC_ARTSC_H HAVE_ARTS_INIT
) )
mark_as_advanced(ARTS_INCLUDE_DIRS ARTS_LIBRARIES HAVE_ARTS_INIT) mark_as_advanced(ARTS_INCLUDE_DIRS ARTS_LIBRARIES HAVE_KDE_ARTSC_ARTSC_H HAVE_ARTS_INIT)
############################################################################
# FindCUnit.txt
# Copyright (C) 2015 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
#
# - Find the CUnit include file and library
#
# CUNIT_FOUND - system has CUnit
# CUNIT_INCLUDE_DIRS - the CUnit include directory
# CUNIT_LIBRARIES - The libraries needed to use CUnit
include(CheckIncludeFile)
include(CheckLibraryExists)
set(_CUNIT_ROOT_PATHS
${CMAKE_INSTALL_PREFIX}
)
find_path(CUNIT_INCLUDE_DIRS
NAMES CUnit/CUnit.h
HINTS _CUNIT_ROOT_PATHS
PATH_SUFFIXES include
)
if(CUNIT_INCLUDE_DIRS)
set(HAVE_CUNIT_CUNIT_H 1)
endif()
find_library(CUNIT_LIBRARIES
NAMES cunit
HINTS ${_CUNIT_ROOT_PATHS}
PATH_SUFFIXES bin lib
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CUnit
DEFAULT_MSG
CUNIT_INCLUDE_DIRS CUNIT_LIBRARIES
)
mark_as_advanced(CUNIT_INCLUDE_DIRS CUNIT_LIBRARIES)
...@@ -30,7 +30,6 @@ include(CMakePushCheckState) ...@@ -30,7 +30,6 @@ include(CMakePushCheckState)
include(CheckSymbolExists) include(CheckSymbolExists)
set(_FFMPEG_ROOT_PATHS set(_FFMPEG_ROOT_PATHS
${WITH_FFMPEG}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
......
...@@ -30,7 +30,6 @@ include(CheckIncludeFile) ...@@ -30,7 +30,6 @@ include(CheckIncludeFile)
include(CheckSymbolExists) include(CheckSymbolExists)
set(_GLX_ROOT_PATHS set(_GLX_ROOT_PATHS
${WITH_GLX}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
# GSM_LIBRARIES - The libraries needed to use gsm # GSM_LIBRARIES - The libraries needed to use gsm
set(_GSM_ROOT_PATHS set(_GSM_ROOT_PATHS
${WITH_GSM}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
...@@ -49,7 +48,7 @@ find_library(GSM_LIBRARIES ...@@ -49,7 +48,7 @@ find_library(GSM_LIBRARIES
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GSM find_package_handle_standard_args(GSM
DEFAULT_MSG DEFAULT_MSG
GSM_INCLUDE_DIRS GSM_LIBRARIES GSM_INCLUDE_DIRS GSM_LIBRARIES HAVE_GSM_GSM_H
) )
mark_as_advanced(GSM_INCLUDE_DIRS GSM_LIBRARIES) mark_as_advanced(GSM_INCLUDE_DIRS GSM_LIBRARIES HAVE_GSM_GSM_H)
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
# OPUS_LIBRARIES - The libraries needed to use opus # OPUS_LIBRARIES - The libraries needed to use opus
set(_OPUS_ROOT_PATHS set(_OPUS_ROOT_PATHS
${WITH_OPUS}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
...@@ -60,7 +59,7 @@ endif() ...@@ -60,7 +59,7 @@ endif()
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Opus find_package_handle_standard_args(Opus
DEFAULT_MSG DEFAULT_MSG
OPUS_INCLUDE_DIRS OPUS_LIBRARIES OPUS_INCLUDE_DIRS OPUS_LIBRARIES HAVE_OPUS_OPUS_H
) )
mark_as_advanced(OPUS_INCLUDE_DIRS OPUS_LIBRARIES) mark_as_advanced(OPUS_INCLUDE_DIRS OPUS_LIBRARIES HAVE_OPUS_OPUS_H)
############################################################################
# FindPolarSSL.txt
# Copyright (C) 2015 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
#
# - Find the polarssl include file and library
#
# POLARSSL_FOUND - system has polarssl
# POLARSSL_INCLUDE_DIRS - the polarssl include directory
# POLARSSL_LIBRARIES - The libraries needed to use polarssl
include(CMakePushCheckState)
include(CheckIncludeFile)
include(CheckCSourceCompiles)
set(_POLARSSL_ROOT_PATHS
${CMAKE_INSTALL_PREFIX}
)
find_path(POLARSSL_INCLUDE_DIRS
NAMES polarssl/ssl.h
HINTS _POLARSSL_ROOT_PATHS
PATH_SUFFIXES include
)
if(POLARSSL_INCLUDE_DIRS)
set(HAVE_POLARSSL_SSL_H 1)
endif()
find_library(POLARSSL_LIBRARIES
NAMES polarssl
HINTS _POLARSSL_ROOT_PATHS
PATH_SUFFIXES bin lib
)
if(POLARSSL_LIBRARIES)
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_INCLUDES ${POLARSSL_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${POLARSSL_LIBRARIES})
check_c_source_compiles("#include <polarssl/version.h>
#include <polarssl/x509.h>
#if POLARSSL_VERSION_NUMBER >= 0x01030000
#include <polarssl/compat-1.2.h>
#endif
int main(int argc, char *argv[]) {
x509parse_crtpath(0,0);
return 0;
}"
X509PARSE_CRTPATH_OK)
cmake_pop_check_state()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PolarSSL
DEFAULT_MSG
POLARSSL_INCLUDE_DIRS POLARSSL_LIBRARIES
)
mark_as_advanced(POLARSSL_INCLUDE_DIRS POLARSSL_LIBRARIES)
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
# PORTAUDIO_LIBRARIES - The libraries needed to use portaudio # PORTAUDIO_LIBRARIES - The libraries needed to use portaudio
include(CheckSymbolExists) include(CheckSymbolExists)
include(CMakePushCheckState)
set(_PORTAUDIO_ROOT_PATHS set(_PORTAUDIO_ROOT_PATHS
${WITH_PORTAUDIO}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
...@@ -49,13 +49,17 @@ find_library(PORTAUDIO_LIBRARIES ...@@ -49,13 +49,17 @@ find_library(PORTAUDIO_LIBRARIES
) )
if(PORTAUDIO_LIBRARIES) if(PORTAUDIO_LIBRARIES)
cmake_push_check_state(RESET)
list(APPEND CMAKE_REQUIRED_INCLUDES ${PORTAUDIO_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_LIBRARIES ${PORTAUDIO_LIBRARIES})
check_symbol_exists(Pa_Initialize portaudio.h HAVE_PA_INITIALIZE) check_symbol_exists(Pa_Initialize portaudio.h HAVE_PA_INITIALIZE)
cmake_pop_check_state()
endif() endif()
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PortAudio find_package_handle_standard_args(PortAudio
DEFAULT_MSG DEFAULT_MSG
PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARIES HAVE_PA_INITIALIZE PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARIES HAVE_PORTAUDIO_H HAVE_PA_INITIALIZE
) )
mark_as_advanced(PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARIES HAVE_PA_INITIALIZE) mark_as_advanced(PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARIES HAVE_PORTAUDIO_H HAVE_PA_INITIALIZE)
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
# PULSEAUDIO_LIBRARIES - The libraries needed to use pulseaudio # PULSEAUDIO_LIBRARIES - The libraries needed to use pulseaudio
include(CheckSymbolExists) include(CheckSymbolExists)
include(CMakePushCheckState)
set(_PULSEAUDIO_ROOT_PATHS set(_PULSEAUDIO_ROOT_PATHS
${WITH_PULSEAUDIO}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
...@@ -49,13 +49,17 @@ find_library(PULSEAUDIO_LIBRARIES ...@@ -49,13 +49,17 @@ find_library(PULSEAUDIO_LIBRARIES
) )
if(PULSEAUDIO_LIBRARIES) if(PULSEAUDIO_LIBRARIES)
check_symbol_exists(pa_mainloop_new pulse/pulseaudio.h HAVE_PA_MAINLOOP_NEW) cmake_push_check_state(RESET)
list(APPEND CMAKE_REQUIRED_INCLUDES ${PULSEAUDIO_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_LIBRARIES ${PULSEAUDIO_LIBRARIES})
check_symbol_exists(pa_mainloop_new "pulse/pulseaudio.h" HAVE_PA_MAINLOOP_NEW)
cmake_pop_check_state()
endif() endif()
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PulseAudio find_package_handle_standard_args(PulseAudio
DEFAULT_MSG DEFAULT_MSG
PULSEAUDIO_INCLUDE_DIRS PULSEAUDIO_LIBRARIES HAVE_PA_MAINLOOP_NEW PULSEAUDIO_INCLUDE_DIRS PULSEAUDIO_LIBRARIES HAVE_PULSE_PULSEAUDIO_H HAVE_PA_MAINLOOP_NEW
) )
mark_as_advanced(PULSEAUDIO_INCLUDE_DIRS PULSEAUDIO_LIBRARIES HAVE_PA_MAINLOOP_NEW) mark_as_advanced(PULSEAUDIO_INCLUDE_DIRS PULSEAUDIO_LIBRARIES HAVE_PULSE_PULSEAUDIO_H HAVE_PA_MAINLOOP_NEW)
...@@ -30,7 +30,6 @@ include(CheckSymbolExists) ...@@ -30,7 +30,6 @@ include(CheckSymbolExists)
include(CMakePushCheckState) include(CMakePushCheckState)
set(_QSA_ROOT_PATHS set(_QSA_ROOT_PATHS
${WITH_QSA}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
...@@ -60,7 +59,7 @@ endif() ...@@ -60,7 +59,7 @@ endif()
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(QSA find_package_handle_standard_args(QSA
DEFAULT_MSG DEFAULT_MSG
QSA_INCLUDE_DIRS QSA_LIBRARIES HAVE_SND_PCM_OPEN QSA_INCLUDE_DIRS QSA_LIBRARIES HAVE_SYS_ASOUNDLIB_H HAVE_SND_PCM_OPEN
) )
mark_as_advanced(QSA_INCLUDE_DIRS QSA_LIBRARIES HAVE_SND_PCM_OPEN) mark_as_advanced(QSA_INCLUDE_DIRS QSA_LIBRARIES HAVE_SYS_ASOUNDLIB_H HAVE_SND_PCM_OPEN)
############################################################################ ############################################################################
# CMakeLists.txt # FindSRTP.txt
# Copyright (C) 2014 Belledonne Communications, Grenoble France # Copyright (C) 2014 Belledonne Communications, Grenoble France
# #
############################################################################ ############################################################################
...@@ -19,9 +19,37 @@ ...@@ -19,9 +19,37 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# #
############################################################################ ############################################################################
#
# - Find the SRTP include file and library
#
# SRTP_FOUND - system has SRTP
# SRTP_INCLUDE_DIRS - the SRTP include directory
# SRTP_LIBRARIES - The libraries needed to use SRTP
set(_SRTP_ROOT_PATHS
${CMAKE_INSTALL_PREFIX}
)
find_path(SRTP_INCLUDE_DIRS
NAMES srtp/srtp.h
HINTS _SRTP_ROOT_PATHS
PATH_SUFFIXES include
)
if(SRTP_INCLUDE_DIRS)
set(HAVE_SRTP_SRTP_H 1)
endif()
find_library(SRTP_LIBRARIES
NAMES srtp
HINTS ${_SRTP_ROOT_PATHS}
PATH_SUFFIXES bin lib
)
file(GLOB CMAKE_FILES "*.cmake") include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SRTP
DEFAULT_MSG
SRTP_INCLUDE_DIRS SRTP_LIBRARIES HAVE_SRTP_SRTP_H
)
install(FILES ${CMAKE_FILES} mark_as_advanced(SRTP_INCLUDE_DIRS SRTP_LIBRARIES HAVE_SRTP_SRTP_H)
DESTINATION share/cmake/Modules
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
# SPEEX_LIBRARIES - The libraries needed to use speex # SPEEX_LIBRARIES - The libraries needed to use speex
set(_SPEEX_ROOT_PATHS set(_SPEEX_ROOT_PATHS
${WITH_SPEEX}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
...@@ -55,7 +54,7 @@ list(APPEND SPEEX_LIBRARIES ${SPEEXDSP_LIBRARIES}) ...@@ -55,7 +54,7 @@ list(APPEND SPEEX_LIBRARIES ${SPEEXDSP_LIBRARIES})
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Speex find_package_handle_standard_args(Speex
DEFAULT_MSG DEFAULT_MSG
SPEEX_INCLUDE_DIRS SPEEX_LIBRARIES SPEEXDSP_LIBRARIES SPEEX_INCLUDE_DIRS SPEEX_LIBRARIES SPEEXDSP_LIBRARIES HAVE_SPEEX_SPEEX_H
) )
mark_as_advanced(SPEEX_INCLUDE_DIRS SPEEX_LIBRARIES) mark_as_advanced(SPEEX_INCLUDE_DIRS SPEEX_LIBRARIES HAVE_SPEEX_SPEEX_H)
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
# V4L_LIBRARIES - The libraries needed to use V4L # V4L_LIBRARIES - The libraries needed to use V4L
set(_V4L_ROOT_PATHS set(_V4L_ROOT_PATHS
${WITH_V4L}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
# VPX_LIBRARIES - The libraries needed to use VPX # VPX_LIBRARIES - The libraries needed to use VPX
set(_VPX_ROOT_PATHS set(_VPX_ROOT_PATHS
${WITH_VPX}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
...@@ -49,7 +48,7 @@ find_library(VPX_LIBRARIES ...@@ -49,7 +48,7 @@ find_library(VPX_LIBRARIES
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(VPX find_package_handle_standard_args(VPX
DEFAULT_MSG DEFAULT_MSG
VPX_INCLUDE_DIRS VPX_LIBRARIES VPX_INCLUDE_DIRS VPX_LIBRARIES HAVE_VPX_VPX_ENCODER_H
) )
mark_as_advanced(VPX_INCLUDE_DIRS VPX_LIBRARIES) mark_as_advanced(VPX_INCLUDE_DIRS VPX_LIBRARIES HAVE_VPX_VPX_ENCODER_H)
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
# X11_LIBRARIES - The libraries needed to use X11 # X11_LIBRARIES - The libraries needed to use X11
set(_X11_ROOT_PATHS set(_X11_ROOT_PATHS
${WITH_X11}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
...@@ -49,7 +48,7 @@ find_library(X11_LIBRARIES ...@@ -49,7 +48,7 @@ find_library(X11_LIBRARIES
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(X11 find_package_handle_standard_args(X11
DEFAULT_MSG DEFAULT_MSG
X11_INCLUDE_DIRS X11_LIBRARIES X11_INCLUDE_DIRS X11_LIBRARIES HAVE_X11_XLIB_H
) )
mark_as_advanced(X11_INCLUDE_DIRS X11_LIBRARIES) mark_as_advanced(X11_INCLUDE_DIRS X11_LIBRARIES HAVE_X11_XLIB_H)
...@@ -32,7 +32,6 @@ include(CheckSymbolExists) ...@@ -32,7 +32,6 @@ include(CheckSymbolExists)
find_package(X11 REQUIRED) find_package(X11 REQUIRED)
set(_XV_ROOT_PATHS set(_XV_ROOT_PATHS
${WITH_XV}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
) )
......
############################################################################
# Mediastreamer2Config.cmake
# Copyright (C) 2015 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
#
# Config file for the mediastreamer2 package.
# It defines the following variables:
#
# MEDIASTREAMER2_FOUND - system has mediastreamer2
# MEDIASTREAMER2_INCLUDE_DIRS - the mediastreamer2 include directory
# MEDIASTREAMER2_LIBRARIES - The libraries needed to use mediastreamer2
# MEDIASTREAMER2_LDFLAGS - The linking flags needed to use mediastreamer2
include("${CMAKE_CURRENT_LIST_DIR}/Mediastreamer2Targets.cmake")
find_package(ORTP REQUIRED)
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)
list(APPEND MEDIASTREAMER2_INCLUDE_DIRS ${ORTP_INCLUDE_DIRS})
list(APPEND MEDIASTREAMER2_LIBRARIES ${ORTP_LIBRARIES})
set(MEDIASTREAMER2_FOUND 1)
...@@ -97,7 +97,7 @@ else() ...@@ -97,7 +97,7 @@ else()
endif() endif()
endif() endif()
install(TARGETS mediastreamer_base install(TARGETS mediastreamer_base EXPORT Mediastreamer2Targets
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
LIBRARY DESTINATION lib LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib ARCHIVE DESTINATION lib
...@@ -416,7 +416,7 @@ if(NOT "${APPLE_SPECIFIC_LINK_FLAGS_STR}" STREQUAL "") ...@@ -416,7 +416,7 @@ if(NOT "${APPLE_SPECIFIC_LINK_FLAGS_STR}" STREQUAL "")
set_target_properties(mediastreamer_voip PROPERTIES LINK_FLAGS ${APPLE_SPECIFIC_LINK_FLAGS_STR}) set_target_properties(mediastreamer_voip PROPERTIES LINK_FLAGS ${APPLE_SPECIFIC_LINK_FLAGS_STR})
endif() endif()
install(TARGETS mediastreamer_voip install(TARGETS mediastreamer_voip EXPORT Mediastreamer2Targets
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
LIBRARY DESTINATION lib LIBRARY DESTINATION lib
ARCHIVE 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