|
Packit Service |
fa4841 |
# - Finds Wayland
|
|
Packit Service |
fa4841 |
# Find the Wayland libraries that are needed for UWAC
|
|
Packit Service |
fa4841 |
#
|
|
Packit Service |
fa4841 |
# This module defines the following variables:
|
|
Packit Service |
fa4841 |
# WAYLAND_FOUND - true if UWAC has been found
|
|
Packit Service |
fa4841 |
# WAYLAND_LIBS - Set to the full path to wayland client libraries
|
|
Packit Service |
fa4841 |
# WAYLAND_INCLUDE_DIR - Set to the include directories for wayland
|
|
Packit Service |
fa4841 |
# XKBCOMMON_LIBS - Set to the full path to xkbcommon libraries
|
|
Packit Service |
fa4841 |
# XKBCOMMON_INCLUDE_DIR - Set to the include directories for xkbcommon
|
|
Packit Service |
fa4841 |
#
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
#=============================================================================
|
|
Packit Service |
fa4841 |
# Copyright 2015 David Fort <contact@hardening-consulting.com>
|
|
Packit Service |
fa4841 |
#
|
|
Packit Service |
fa4841 |
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
Packit Service |
fa4841 |
# you may not use this file except in compliance with the License.
|
|
Packit Service |
fa4841 |
# You may obtain a copy of the License at
|
|
Packit Service |
fa4841 |
#
|
|
Packit Service |
fa4841 |
# http://www.apache.org/licenses/LICENSE-2.0
|
|
Packit Service |
fa4841 |
#
|
|
Packit Service |
fa4841 |
# Unless required by applicable law or agreed to in writing, software
|
|
Packit Service |
fa4841 |
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
Packit Service |
fa4841 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
Packit Service |
fa4841 |
# See the License for the specific language governing permissions and
|
|
Packit Service |
fa4841 |
# limitations under the License.
|
|
Packit Service |
fa4841 |
#=============================================================================
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
include(FindPkgConfig)
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
if(PKG_CONFIG_FOUND)
|
|
Packit Service |
fa4841 |
pkg_check_modules(WAYLAND_SCANNER_PC wayland-scanner)
|
|
Packit Service |
fa4841 |
pkg_check_modules(WAYLAND_CLIENT_PC wayland-client)
|
|
Packit Service |
b1ea74 |
pkg_check_modules(WAYLAND_CURSOR_PC wayland-cursor)
|
|
Packit Service |
fa4841 |
pkg_check_modules(XKBCOMMON_PC xkbcommon)
|
|
Packit Service |
fa4841 |
endif()
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
find_program(WAYLAND_SCANNER wayland-scanner
|
|
Packit Service |
fa4841 |
HINTS "${WAYLAND_SCANNER_PC_PREFIX}/bin"
|
|
Packit Service |
fa4841 |
)
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
find_path(WAYLAND_INCLUDE_DIR wayland-client.h
|
|
Packit Service |
fa4841 |
HINTS ${WAYLAND_CLIENT_PC_INCLUDE_DIRS}
|
|
Packit Service |
fa4841 |
)
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
find_library(WAYLAND_CLIENT_LIB
|
|
Packit Service |
fa4841 |
NAMES "wayland-client"
|
|
Packit Service |
fa4841 |
HINTS "${WAYLAND_CLIENT_PC_LIBRARY_DIRS}"
|
|
Packit Service |
fa4841 |
)
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
b1ea74 |
find_library(WAYLAND_CURSOR_LIB
|
|
Packit Service |
b1ea74 |
NAMES "wayland-cursor"
|
|
Packit Service |
b1ea74 |
HINTS "${WAYLAND_CURSOR_PC_LIBRARY_DIRS}"
|
|
Packit Service |
b1ea74 |
)
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
if (WAYLAND_CLIENT_LIB AND WAYLAND_CURSOR_LIB)
|
|
Packit Service |
b1ea74 |
list(APPEND WAYLAND_LIBS ${WAYLAND_CLIENT_LIB} ${WAYLAND_CURSOR_LIB})
|
|
Packit Service |
b1ea74 |
endif (WAYLAND_CLIENT_LIB AND WAYLAND_CURSOR_LIB)
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
fa4841 |
find_path(XKBCOMMON_INCLUDE_DIR xkbcommon/xkbcommon.h
|
|
Packit Service |
fa4841 |
HINTS ${XKBCOMMON_PC_INCLUDE_DIRS}
|
|
Packit Service |
fa4841 |
)
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
find_library(XKBCOMMON_LIBS
|
|
Packit Service |
fa4841 |
NAMES xkbcommon
|
|
Packit Service |
fa4841 |
HINTS "${XKBCOMMON_PC_LIBRARY_DIRS}"
|
|
Packit Service |
fa4841 |
)
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
include(FindPackageHandleStandardArgs)
|
|
Packit Service |
fa4841 |
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND DEFAULT_MSG WAYLAND_SCANNER WAYLAND_INCLUDE_DIR WAYLAND_LIBS XKBCOMMON_INCLUDE_DIR XKBCOMMON_LIBS)
|