From b08aa9fd35d650b15a5322bd1b6edea01f152f27 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 11 Jul 2017 22:16:56 -0400 Subject: Revert "Merge pull request #27 from ascent12/meson" This reverts commit 85805da021006697c85489c3e30717c2b807441c, reversing changes made to 8189c64d7f07a756abf5a6189719f02b2f1af967. --- CMake/FindWayland.cmake | 69 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 CMake/FindWayland.cmake (limited to 'CMake/FindWayland.cmake') diff --git a/CMake/FindWayland.cmake b/CMake/FindWayland.cmake new file mode 100644 index 00000000..465d2665 --- /dev/null +++ b/CMake/FindWayland.cmake @@ -0,0 +1,69 @@ +#.rst: +# FindWayland +# ----------- +# +# Find Wayland installation +# +# Try to find Wayland. The following values are defined +# +# :: +# +# WAYLAND_FOUND - True if Wayland is found +# WAYLAND_LIBRARIES - Link these to use Wayland +# WAYLAND_INCLUDE_DIRS - Include directories for Wayland +# WAYLAND_DEFINITIONS - Compiler flags for using Wayland +# +# and also the following more fine grained variables: +# +# :: +# +# WAYLAND_CLIENT_FOUND, WAYLAND_CLIENT_INCLUDE_DIRS, WAYLAND_CLIENT_LIBRARIES +# WAYLAND_SERVER_FOUND, WAYLAND_SERVER_INCLUDE_DIRS, WAYLAND_SERVER_LIBRARIES +# WAYLAND_EGL_FOUND, WAYLAND_EGL_INCLUDE_DIRS, WAYLAND_EGL_LIBRARIES +# +#============================================================================= +# Copyright (c) 2015 Jari Vetoniemi +# 2013 Martin Gräßlin +# +# 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(Wayland PROPERTIES + URL "http://wayland.freedesktop.org/" + DESCRIPTION "Protocol for implementing compositors") + +find_package(PkgConfig) +pkg_check_modules(PC_WAYLAND QUIET wayland-client>=1.7 wayland-server>=1.7 wayland-egl) + +find_library(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client HINTS ${PC_WAYLAND_LIBRARY_DIRS}) +find_library(WAYLAND_SERVER_LIBRARIES NAMES wayland-server HINTS ${PC_WAYLAND_LIBRARY_DIRS}) +find_library(WAYLAND_EGL_LIBRARIES NAMES wayland-egl HINTS ${PC_WAYLAND_LIBRARY_DIRS}) + +find_path(WAYLAND_CLIENT_INCLUDE_DIRS NAMES wayland-client.h HINTS ${PC_WAYLAND_INCLUDE_DIRS}) +find_path(WAYLAND_SERVER_INCLUDE_DIRS NAMES wayland-server.h HINTS ${PC_WAYLAND_INCLUDE_DIRS}) +find_path(WAYLAND_EGL_INCLUDE_DIRS NAMES wayland-egl.h HINTS ${PC_WAYLAND_INCLUDE_DIRS}) + +set(WAYLAND_INCLUDE_DIRS ${WAYLAND_CLIENT_INCLUDE_DIRS} ${WAYLAND_SERVER_INCLUDE_DIRS} ${WAYLAND_EGL_INCLUDE_DIRS}) +set(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_EGL_LIBRARIES}) +set(WAYLAND_DEFINITIONS ${PC_WAYLAND_CFLAGS}) + +list(REMOVE_DUPLICATES WAYLAND_INCLUDE_DIRS) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(WAYLAND_CLIENT DEFAULT_MSG WAYLAND_CLIENT_LIBRARIES WAYLAND_CLIENT_INCLUDE_DIRS) +find_package_handle_standard_args(WAYLAND_SERVER DEFAULT_MSG WAYLAND_SERVER_LIBRARIES WAYLAND_SERVER_INCLUDE_DIRS) +find_package_handle_standard_args(WAYLAND_EGL DEFAULT_MSG WAYLAND_EGL_LIBRARIES WAYLAND_EGL_INCLUDE_DIRS) +find_package_handle_standard_args(WAYLAND DEFAULT_MSG WAYLAND_LIBRARIES WAYLAND_INCLUDE_DIRS) + +mark_as_advanced( + WAYLAND_INCLUDE_DIRS WAYLAND_LIBRARIES + WAYLAND_CLIENT_INCLUDE_DIRS WAYLAND_CLIENT_LIBRARIES + WAYLAND_SERVER_INCLUDE_DIRS WAYLAND_SERVER_LIBRARIES + WAYLAND_EGL_INCLUDE_DIRS WAYLAND_EGL_LIBRARIES + WAYLAND_DEFINITIONS + ) -- cgit v1.2.3