BelcardConfig.cmake.in 1.95 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
@PACKAGE_INIT@

set(BELCARD_TARGETNAME belcard)
include("${CMAKE_CURRENT_LIST_DIR}/${BELCARD_TARGETNAME}Targets.cmake")
Sylvain Berfini's avatar
Sylvain Berfini committed
35

36 37
if(@ENABLE_SHARED@)
	set(BELCARD_LIBRARIES ${BELCARD_TARGETNAME})
38
else()
39
	if(TARGET ${BELCARD_TARGETNAME})
40
		get_target_property(BELCARD_LIBRARIES ${BELCARD_TARGETNAME} LOCATION)
41 42 43 44 45
		get_target_property(BELCARD_LINK_LIBRARIES ${BELCARD_TARGETNAME} INTERFACE_LINK_LIBRARIES)
		if(BELCARD_LINK_LIBRARIES)
			list(APPEND BELCARD_LIBRARIES ${BELCARD_LINK_LIBRARIES})
		endif()
	endif()
46
endif()
47

48
get_target_property(BELCARD_INCLUDE_DIRS ${BELCARD_TARGETNAME} INTERFACE_INCLUDE_DIRECTORIES)
49

50
set(BELCARD_CPPFLAGS @BELCARD_CPPFLAGS@)
Sylvain Berfini's avatar
Sylvain Berfini committed
51
set(BELCARD_FOUND 1)