diff options
author | Scott Anderson <ascent12@hotmail.com> | 2017-05-02 18:13:17 +1200 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2017-05-02 18:13:17 +1200 |
commit | e446a5300b742dd8a7f403bf96d1137e91ba1b11 (patch) | |
tree | 8869c45edca511f3743046003725fecbc5d77c9d /CMake | |
parent | e9d716fc0c294849b627b35f6ea15f60fbdeb522 (diff) | |
download | wlroots-e446a5300b742dd8a7f403bf96d1137e91ba1b11.tar.xz |
Added example.
Diffstat (limited to 'CMake')
-rw-r--r-- | CMake/FindGBM.cmake | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/CMake/FindGBM.cmake b/CMake/FindGBM.cmake new file mode 100644 index 00000000..85df1f7c --- /dev/null +++ b/CMake/FindGBM.cmake @@ -0,0 +1,39 @@ +#.rst: +# FindGBM +# ------- +# +# Find GBM library +# +# Try to find GBM library on UNIX systems. The following values are defined +# +# :: +# +# GBM_FOUND - True if gbm is available +# GBM_INCLUDE_DIRS - Include directories for gbm +# GBM_LIBRARIES - List of libraries for gbm +# GBM_DEFINITIONS - List of definitions for gbm +# +#============================================================================= +# 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. +#============================================================================= + +set_package_properties(GBM PROPERTIES + URL "http://www.mesa3d.org/" + DESCRIPTION "Generic buffer manager") + +find_package(PkgConfig) +pkg_check_modules(PC_GBM QUIET gbm) +find_library(GBM_LIBRARIES NAMES gbm HINTS ${PC_GBM_LIBRARY_DIRS}) +find_path(GBM_INCLUDE_DIRS gbm.h HINTS ${PC_GBM_INCLUDE_DIRS}) + +set(GBM_DEFINITIONS ${PC_GBM_CFLAGS_OTHER}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(GBM DEFAULT_MSG GBM_INCLUDE_DIRS GBM_LIBRARIES) +mark_as_advanced(GBM_INCLUDE_DIRS GBM_LIBRARIES GBM_DEFINITIONS) |