* Fixed VCS-Fields to branch debian/sidubuntu/cosmic debian/0.3.0-1
parent
559b04e57e
commit
48039fb663
@ -0,0 +1,80 @@
|
|||||||
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||||
|
# BSD-3-Clause file for details.
|
||||||
|
|
||||||
|
#.rst:
|
||||||
|
# FindFm
|
||||||
|
# -----------
|
||||||
|
#
|
||||||
|
# Try to find the Fm library
|
||||||
|
#
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# FM_FOUND - System has the Fm library
|
||||||
|
# FM_INCLUDE_DIR - The Fm library include directory
|
||||||
|
# FM_INCLUDE_DIRS - Location of the headers needed to use the Fm library
|
||||||
|
# FM_LIBRARIES - The libraries needed to use the Fm library
|
||||||
|
# FM_DEFINITIONS - Compiler switches required for using the Fm library
|
||||||
|
# FM_VERSION_STRING - the version of the Fm library found
|
||||||
|
|
||||||
|
|
||||||
|
# use pkg-config to get the directories and then use these values
|
||||||
|
# in the find_path() and find_library() calls
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_check_modules(PC_FM QUIET libfm)
|
||||||
|
set(FM_DEFINITIONS ${PC_FM_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
find_path(FM_INCLUDE_DIR NAMES libfm/fm.h
|
||||||
|
HINTS
|
||||||
|
${PC_FM_INCLUDEDIR}
|
||||||
|
${PC_FM_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES libfm
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(FM_LIBRARIES NAMES fm libfm
|
||||||
|
HINTS
|
||||||
|
${PC_FM_LIBDIR}
|
||||||
|
${PC_FM_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# iterate over all dependencies
|
||||||
|
unset(FD_LIBRARIES)
|
||||||
|
foreach(depend ${PC_FM_LIBRARIES})
|
||||||
|
find_library(_DEPEND_LIBRARIES
|
||||||
|
NAMES
|
||||||
|
${depend}
|
||||||
|
HINTS
|
||||||
|
${PC_FM_LIBDIR}
|
||||||
|
${PC_FM_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
if (_DEPEND_LIBRARIES)
|
||||||
|
list(APPEND FD_LIBRARIES ${_DEPEND_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
unset(_DEPEND_LIBRARIES CACHE)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
set(FM_VERSION_STRING ${PC_FM_VERSION})
|
||||||
|
set(FM_INCLUDE_DIR ${PC_FM_INCLUDEDIR})
|
||||||
|
|
||||||
|
list(APPEND FM_INCLUDE_DIRS
|
||||||
|
${FM_INCLUDE_DIR}
|
||||||
|
${PC_FM_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
list(REMOVE_DUPLICATES FM_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
list(APPEND FM_LIBRARIES
|
||||||
|
${FD_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
list(REMOVE_DUPLICATES FM_LIBRARIES)
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set FM_FOUND to TRUE if
|
||||||
|
# all listed variables are TRUE
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Fm
|
||||||
|
REQUIRED_VARS FM_LIBRARIES FM_INCLUDE_DIR FM_INCLUDE_DIRS
|
||||||
|
VERSION_VAR FM_VERSION_STRING)
|
||||||
|
|
||||||
|
mark_as_advanced(FM_INCLUDE_DIR FM_LIBRARIES)
|
@ -0,0 +1,126 @@
|
|||||||
|
# - Try to find Glib and its components (gio, gobject etc)
|
||||||
|
# Once done, this will define
|
||||||
|
#
|
||||||
|
# GLIB_FOUND - system has Glib
|
||||||
|
# GLIB_INCLUDE_DIRS - the Glib include directories
|
||||||
|
# GLIB_LIBRARIES - link these to use Glib
|
||||||
|
#
|
||||||
|
# Optionally, the COMPONENTS keyword can be passed to find_package()
|
||||||
|
# and Glib components can be looked for. Currently, the following
|
||||||
|
# components can be used, and they define the following variables if
|
||||||
|
# found:
|
||||||
|
#
|
||||||
|
# gio: GLIB_GIO_LIBRARIES
|
||||||
|
# gobject: GLIB_GOBJECT_LIBRARIES
|
||||||
|
# gmodule: GLIB_GMODULE_LIBRARIES
|
||||||
|
# gthread: GLIB_GTHREAD_LIBRARIES
|
||||||
|
#
|
||||||
|
# Note that the respective _INCLUDE_DIR variables are not set, since
|
||||||
|
# all headers are in the same directory as GLIB_INCLUDE_DIRS.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
|
||||||
|
# Copyright (C) 2016 Luís Pereira <luis.artur.pereira@gmail.com>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
|
||||||
|
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
|
||||||
|
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
find_package(PkgConfig)
|
||||||
|
pkg_check_modules(PC_GLIB QUIET glib-2.0)
|
||||||
|
|
||||||
|
find_library(GLIB_LIBRARIES
|
||||||
|
NAMES glib-2.0
|
||||||
|
HINTS ${PC_GLIB_LIBDIR}
|
||||||
|
${PC_GLIB_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Files in glib's main include path may include glibconfig.h, which,
|
||||||
|
# for some odd reason, is normally in $LIBDIR/glib-2.0/include.
|
||||||
|
get_filename_component(_GLIB_LIBRARY_DIR ${GLIB_LIBRARIES} PATH)
|
||||||
|
find_path(GLIBCONFIG_INCLUDE_DIR
|
||||||
|
NAMES glibconfig.h
|
||||||
|
HINTS ${PC_LIBDIR} ${PC_LIBRARY_DIRS} ${_GLIB_LIBRARY_DIR}
|
||||||
|
${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES glib-2.0/include
|
||||||
|
)
|
||||||
|
|
||||||
|
find_path(GLIB_INCLUDE_DIR
|
||||||
|
NAMES glib.h
|
||||||
|
HINTS ${PC_GLIB_INCLUDEDIR}
|
||||||
|
${PC_GLIB_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES glib-2.0
|
||||||
|
)
|
||||||
|
|
||||||
|
set(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIBCONFIG_INCLUDE_DIR})
|
||||||
|
|
||||||
|
# Version detection
|
||||||
|
if (EXISTS "${GLIBCONFIG_INCLUDE_DIR}/glibconfig.h")
|
||||||
|
file(READ "${GLIBCONFIG_INCLUDE_DIR}/glibconfig.h" GLIBCONFIG_H_CONTENTS)
|
||||||
|
string(REGEX MATCH "#define GLIB_MAJOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
|
||||||
|
set(GLIB_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
||||||
|
string(REGEX MATCH "#define GLIB_MINOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
|
||||||
|
set(GLIB_VERSION_MINOR "${CMAKE_MATCH_1}")
|
||||||
|
string(REGEX MATCH "#define GLIB_MICRO_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
|
||||||
|
set(GLIB_VERSION_MICRO "${CMAKE_MATCH_1}")
|
||||||
|
set(GLIB_VERSION "${GLIB_VERSION_MAJOR}.${GLIB_VERSION_MINOR}.${GLIB_VERSION_MICRO}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Additional Glib components. We only look for libraries, as not all of them
|
||||||
|
# have corresponding headers and all headers are installed alongside the main
|
||||||
|
# glib ones.
|
||||||
|
foreach (_component ${GLIB_FIND_COMPONENTS})
|
||||||
|
if (${_component} STREQUAL "gio")
|
||||||
|
find_library(GLIB_GIO_LIBRARIES NAMES gio-2.0 HINTS ${_GLIB_LIBRARY_DIR})
|
||||||
|
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GIO_LIBRARIES)
|
||||||
|
elseif (${_component} STREQUAL "gobject")
|
||||||
|
find_library(GLIB_GOBJECT_LIBRARIES NAMES gobject-2.0 HINTS ${_GLIB_LIBRARY_DIR})
|
||||||
|
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GOBJECT_LIBRARIES)
|
||||||
|
elseif (${_component} STREQUAL "gmodule")
|
||||||
|
find_library(GLIB_GMODULE_LIBRARIES NAMES gmodule-2.0 HINTS ${_GLIB_LIBRARY_DIR})
|
||||||
|
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GMODULE_LIBRARIES)
|
||||||
|
elseif (${_component} STREQUAL "gthread")
|
||||||
|
find_library(GLIB_GTHREAD_LIBRARIES NAMES gthread-2.0 HINTS ${_GLIB_LIBRARY_DIR})
|
||||||
|
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GTHREAD_LIBRARIES)
|
||||||
|
elseif (${_component} STREQUAL "gio-unix")
|
||||||
|
pkg_check_modules(GIO_UNIX QUIET gio-unix-2.0)
|
||||||
|
find_path(GLIB_GIO_UNIX_INCLUDE_DIR
|
||||||
|
NAMES gio/gunixconnection.h
|
||||||
|
HINTS ${GIO_UNIX_INCLUDEDIR}
|
||||||
|
PATH_SUFFIXES gio-unix-2.0)
|
||||||
|
|
||||||
|
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GIO_UNIX_INCLUDE_DIR)
|
||||||
|
endif ()
|
||||||
|
endforeach ()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLIB REQUIRED_VARS GLIB_INCLUDE_DIRS GLIB_LIBRARIES ${ADDITIONAL_REQUIRED_VARS}
|
||||||
|
VERSION_VAR GLIB_VERSION)
|
||||||
|
|
||||||
|
mark_as_advanced(
|
||||||
|
GLIBCONFIG_INCLUDE_DIR
|
||||||
|
GLIB_GIO_LIBRARIES
|
||||||
|
GLIB_GIO_UNIX_INCLUDE_DIR
|
||||||
|
GLIB_GMODULE_LIBRARIES
|
||||||
|
GLIB_GOBJECT_LIBRARIES
|
||||||
|
GLIB_GTHREAD_LIBRARIES
|
||||||
|
GLIB_INCLUDE_DIR
|
||||||
|
GLIB_INCLUDE_DIRS
|
||||||
|
GLIB_LIBRARIES
|
||||||
|
)
|
@ -0,0 +1,88 @@
|
|||||||
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||||
|
# BSD-3-Clause file for details.
|
||||||
|
|
||||||
|
#.rst:
|
||||||
|
# FindMenuCache
|
||||||
|
# -----------
|
||||||
|
#
|
||||||
|
# Try to find the MenuCache library
|
||||||
|
#
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# MENUCACHE_FOUND - System has the MenuCache library
|
||||||
|
# MENUCACHE_INCLUDE_DIR - The MenuCache library include directory
|
||||||
|
# MENUCACHE_INCLUDE_DIRS - Location of the headers needed to use the MenuCache library
|
||||||
|
# MENUCACHE_LIBRARIES - The libraries needed to the MenuCache library
|
||||||
|
# MENUCACHE_DEFINITIONS - Compiler switches required for using the MenuCache library
|
||||||
|
# MENUCACHE_VERSION_STRING - the version of MenuCache library found
|
||||||
|
|
||||||
|
|
||||||
|
# use pkg-config to get the directories and then use these values
|
||||||
|
# in the find_path() and find_library() calls
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_check_modules(PC_MENUCACHE QUIET libmenu-cache)
|
||||||
|
set(MENUCACHE_DEFINITIONS ${PC_MENUCACHE_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
find_path(MENUCACHE_INCLUDE_DIRS
|
||||||
|
NAMES
|
||||||
|
menu-cache.h
|
||||||
|
menu-cache/menu-cache.h
|
||||||
|
HINTS
|
||||||
|
${PC_MENUCACHE_INCLUDEDIR}
|
||||||
|
${PC_MENUCACHE_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
libmenu-cache
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(MENUCACHE_LIBRARIES
|
||||||
|
NAMES
|
||||||
|
menu-cache
|
||||||
|
libmenu-cache
|
||||||
|
HINTS
|
||||||
|
${PC_MENUCACHE_LIBDIR}
|
||||||
|
${PC_MENUCACHE_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# iterate over all dependencies
|
||||||
|
unset(FD_LIBRARIES)
|
||||||
|
foreach(depend ${PC_MENUCACHE_LIBRARIES})
|
||||||
|
find_library(_DEPEND_LIBRARIES
|
||||||
|
NAMES
|
||||||
|
${depend}
|
||||||
|
HINTS
|
||||||
|
${PC_MENUCACHE_LIBDIR}
|
||||||
|
${PC_MENUCACHE_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
if (_DEPEND_LIBRARIES)
|
||||||
|
list(APPEND FD_LIBRARIES ${_DEPEND_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
unset(_DEPEND_LIBRARIES CACHE)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
set(MENUCACHE_VERSION_STRING ${PC_MENUCACHE_VERSION})
|
||||||
|
set(MENUCACHE_INCLUDE_DIR ${PC_MENUCACHE_INCLUDEDIR})
|
||||||
|
|
||||||
|
list(APPEND MENUCACHE_INCLUDE_DIRS
|
||||||
|
${MENUCACHE_INCLUDE_DIR}
|
||||||
|
${PC_MENUCACHE_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
list(REMOVE_DUPLICATES MENUCACHE_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
list(APPEND MENUCACHE_LIBRARIES
|
||||||
|
${FD_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
list(REMOVE_DUPLICATES MENUCACHE_LIBRARIES)
|
||||||
|
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set MENUCACHE_FOUND to TRUE if
|
||||||
|
# all listed variables are TRUE
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(MenuCache
|
||||||
|
REQUIRED_VARS MENUCACHE_LIBRARIES MENUCACHE_INCLUDE_DIR MENUCACHE_INCLUDE_DIRS
|
||||||
|
VERSION_VAR MENUCACHE_VERSION_STRING)
|
||||||
|
|
||||||
|
mark_as_advanced(MENUCACHE_INCLUDE_DIR MENUCACHE_LIBRARIES)
|
@ -0,0 +1,65 @@
|
|||||||
|
# - Try to find the UDev library
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# UDEV_FOUND - system has UDev
|
||||||
|
# UDEV_INCLUDE_DIR - the libudev include directory
|
||||||
|
# UDEV_LIBS - The libudev libraries
|
||||||
|
|
||||||
|
# Copyright (c) 2010, Rafael Fernández López, <ereslibre@kde.org>
|
||||||
|
# Copyright (c) 2016, Luís Pereira, <luis.artur.pereira@gmail.com>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# 3. Neither the name of the University nor the names of its contributors
|
||||||
|
# may be used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||||
|
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
# SUCH DAMAGE.
|
||||||
|
|
||||||
|
find_package(PkgConfig)
|
||||||
|
pkg_check_modules(PC_UDEV QUIET libudev)
|
||||||
|
|
||||||
|
find_path(UDEV_INCLUDE_DIR libudev.h
|
||||||
|
HINTS ${PC_UDEV_INCLUDEDIR} ${PC_UDEV_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
find_library(UDEV_LIBS udev HINTS ${PC_UDEV_LIBDIR} ${PC_UDEV_LIBRARY_DIRS})
|
||||||
|
|
||||||
|
if(UDEV_INCLUDE_DIR AND UDEV_LIBS)
|
||||||
|
include(CheckFunctionExists)
|
||||||
|
include(CMakePushCheckState)
|
||||||
|
cmake_push_check_state()
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${UDEV_LIBS} )
|
||||||
|
|
||||||
|
cmake_pop_check_state()
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(UDEV_VERSION_STRING ${PC_UDEV_VERSION})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(UDev
|
||||||
|
REQUIRED_VARS UDEV_INCLUDE_DIR UDEV_LIBS
|
||||||
|
VERSION_VAR ${UDEV_VERSION_STRING})
|
||||||
|
|
||||||
|
mark_as_advanced(UDEV_INCLUDE_DIR UDEV_LIBS)
|
||||||
|
|
||||||
|
include(FeatureSummary)
|
||||||
|
set_package_properties(UDev PROPERTIES
|
||||||
|
URL "https://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html"
|
||||||
|
DESCRIPTION "Linux dynamic device management")
|
@ -0,0 +1,53 @@
|
|||||||
|
#.rst:
|
||||||
|
# FindXCB
|
||||||
|
# -------
|
||||||
|
#
|
||||||
|
# Find XCB libraries
|
||||||
|
#
|
||||||
|
# Tries to find xcb libraries on unix systems.
|
||||||
|
#
|
||||||
|
# - Be sure to set the COMPONENTS to the components you want to link to
|
||||||
|
# - The XCB_LIBRARIES variable is set ONLY to your COMPONENTS list
|
||||||
|
# - To use only a specific component check the XCB_LIBRARIES_${COMPONENT} variable
|
||||||
|
#
|
||||||
|
# The following values are defined
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# XCB_FOUND - True if xcb is available
|
||||||
|
# XCB_INCLUDE_DIRS - Include directories for xcb
|
||||||
|
# XCB_LIBRARIES - List of libraries for xcb
|
||||||
|
# XCB_DEFINITIONS - List of definitions for xcb
|
||||||
|
#
|
||||||
|
#=============================================================================
|
||||||
|
# Copyright (c) 2015 Jari Vetoniemi
|
||||||
|
#
|
||||||
|
# Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
#
|
||||||
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
# See the License for more information.
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
|
include(FeatureSummary)
|
||||||
|
set_package_properties(XCB PROPERTIES
|
||||||
|
URL "http://xcb.freedesktop.org/"
|
||||||
|
DESCRIPTION "X protocol C-language Binding")
|
||||||
|
|
||||||
|
find_package(PkgConfig)
|
||||||
|
pkg_check_modules(PC_XCB QUIET xcb ${XCB_FIND_COMPONENTS})
|
||||||
|
|
||||||
|
find_library(XCB_LIBRARIES xcb HINTS ${PC_XCB_LIBRARY_DIRS})
|
||||||
|
find_path(XCB_INCLUDE_DIRS xcb/xcb.h PATH_SUFFIXES xcb HINTS ${PC_XCB_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
foreach(COMPONENT ${XCB_FIND_COMPONENTS})
|
||||||
|
find_library(XCB_LIBRARIES_${COMPONENT} ${COMPONENT} HINTS ${PC_XCB_LIBRARY_DIRS})
|
||||||
|
list(APPEND XCB_LIBRARIES ${XCB_LIBRARIES_${COMPONENT}})
|
||||||
|
mark_as_advanced(XCB_LIBRARIES_${COMPONENT})
|
||||||
|
endforeach(COMPONENT ${XCB_FIND_COMPONENTS})
|
||||||
|
|
||||||
|
set(XCB_DEFINITIONS ${PC_XCB_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(XCB DEFAULT_MSG XCB_LIBRARIES XCB_INCLUDE_DIRS)
|
||||||
|
mark_as_advanced(XCB_INCLUDE_DIRS XCB_LIBRARIES XCB_DEFINITIONS)
|
Loading…
Reference in new issue