BelcardConfig.cmake.in 2.13 KB
Newer Older
Sylvain Berfini's avatar
Sylvain Berfini committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
############################################################################
# BelcardConfig.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
19
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
Sylvain Berfini's avatar
Sylvain Berfini committed
20 21 22 23 24 25 26 27 28
#
############################################################################
#
# Config file for the belcard package.
# It defines the following variables:
#
#  BELCARD_FOUND - system has belcard
#  BELCARD_INCLUDE_DIRS - the belcard include directory
#  BELCARD_LIBRARIES - The libraries needed to use belcard
29
#  BELCARD_CPPFLAGS - The compilation flags needed to use belcard
Sylvain Berfini's avatar
Sylvain Berfini committed
30 31 32 33 34

if(NOT LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
	include("${CMAKE_CURRENT_LIST_DIR}/BelcardTargets.cmake")
endif()

35 36 37 38 39 40
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
	include("${EP_belr_CONFIG_DIR}/BelrConfig.cmake")
else()
	find_package(Belr REQUIRED)
endif()

Sylvain Berfini's avatar
Sylvain Berfini committed
41 42 43 44 45 46
get_filename_component(BELCARD_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
	set(BELCARD_INCLUDE_DIRS "${EP_belcard_INCLUDE_DIR}")
else()
	set(BELCARD_INCLUDE_DIRS "${BELCARD_CMAKE_DIR}/../../../include")
endif()
47

48 49 50 51 52
if(@ENABLE_SHARED@)
	set(BELCARD_LIBRARIES belcard)
else()
	set(BELCARD_LIBRARIES belcard-static)
endif()
53 54 55 56 57
if(BELR_FOUND)
	list(APPEND BELCARD_INCLUDE_DIRS ${BELR_INCLUDE_DIRS})
	list(APPEND BELCARD_LIBRARIES ${BELR_LIBRARIES})
endif()

58
set(BELCARD_CPPFLAGS @BELCARD_CPPFLAGS@)
Sylvain Berfini's avatar
Sylvain Berfini committed
59
set(BELCARD_FOUND 1)