LinphoneConfig.cmake.in 2.34 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
############################################################################
# LinphoneConfig.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 belle-sip package.
# It defines the following variables:
#
#  LINPHONE_FOUND - system has linphone
#  LINPHONE_INCLUDE_DIRS - the linphone include directory
#  LINPHONE_LIBRARIES - The libraries needed to use linphone
29
#  LINPHONE_CPPFLAGS - The compilation flags needed to use linphone
30 31
#  LINPHONE_LDFLAGS - The linking flags needed to use linphone

32 33 34 35
if(NOT LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
	include("${CMAKE_CURRENT_LIST_DIR}/LinphoneTargets.cmake")
endif()

36 37
find_package(Mediastreamer2 REQUIRED)
find_package(BelleSIP REQUIRED)
38 39 40 41 42 43
if(@ENABLE_TUNNEL@)
	find_package(Tunnel)
endif()

get_filename_component(LINPHONE_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(LINPHONE_INCLUDE_DIRS "${LINPHONE_CMAKE_DIR}/../../../include")
44 45 46 47 48
if(@ENABLE_SHARED@)
	set(LINPHONE_LIBRARIES linphone)
else()
	set(LINPHONE_LIBRARIES linphone-static)
endif()
49
set(LINPHONE_LDFLAGS @LINK_FLAGS@)
50 51
list(APPEND LINPHONE_INCLUDE_DIRS ${MEDIASTREAMER2_INCLUDE_DIRS} ${BELLESIP_INCLUDE_DIRS})
list(APPEND LINPHONE_LIBRARIES ${MEDIASTREAMER2_LIBRARIES} ${BELLESIP_LIBRARIES})
52 53
set(LINPHONE_CPPFLAGS "${MEDIASTREAMER2_CPPFLAGS}")
set(LINPHONE_LDFLAGS "${MEDIASTREAMER2_LDFLAGS} ${BELLESIP_LDFLAGS}")
54 55 56 57 58
if(TUNNEL_FOUND)
	list(APPEND LINPHONE_INCLUDE_DIRS ${TUNNEL_INCLUDE_DIRS})
	list(APPEND LINPHONE_LIBRARIES ${TUNNEL_LIBRARIES})
endif()
set(LINPHONE_FOUND 1)