From b1a071d55113ece2c9c8d4a767ff500de7e13ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 8 Nov 2011 17:52:09 -0500 Subject: [PATCH] xfreerdp-server: add missing FindXdamage.cmake --- .gitignore | 7 +++++- cmake/FindXdamage.cmake | 48 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 cmake/FindXdamage.cmake diff --git a/.gitignore b/.gitignore index c0e27708d..2f957d723 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ # CMake -*.cmake CMakeFiles/ CMakeCache.txt config.h @@ -7,6 +6,12 @@ install_manifest.txt CTestTestfile.cmake freerdp.pc +*.cmake +/**/*.cmake +/**/**/*.cmake +/**/**/**/*.cmake +/**/**/**/**/*.cmake + # Make Makefile diff --git a/cmake/FindXdamage.cmake b/cmake/FindXdamage.cmake new file mode 100644 index 000000000..a84dfd483 --- /dev/null +++ b/cmake/FindXdamage.cmake @@ -0,0 +1,48 @@ +# - Find XDAMAGE +# Find the XDAMAGE libraries +# +# This module defines the following variables: +# XDAMAGE_FOUND - True if XDAMAGE_INCLUDE_DIR & XDAMAGE_LIBRARY are found +# XDAMAGE_LIBRARIES - Set when XDAMAGE_LIBRARY is found +# XDAMAGE_INCLUDE_DIRS - Set when XDAMAGE_INCLUDE_DIR is found +# +# XDAMAGE_INCLUDE_DIR - where to find Xdamage.h, etc. +# XDAMAGE_LIBRARY - the XDAMAGE library +# + +#============================================================================= +# Copyright 2011 O.S. Systems Software Ltda. +# Copyright 2011 Otavio Salvador +# Copyright 2011 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#============================================================================= + +find_path(XDAMAGE_INCLUDE_DIR NAMES Xdamage.h + PATH_SUFFIXES X11/extensions + DOC "The Xdamage include directory" +) + +find_library(XDAMAGE_LIBRARY NAMES Xdamage + DOC "The Xdamage library" +) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(XDAMAGE DEFAULT_MSG XDAMAGE_LIBRARY XDAMAGE_INCLUDE_DIR) + +if(XDAMAGE_FOUND) + set( XDAMAGE_LIBRARIES ${XDAMAGE_LIBRARY} ) + set( XDAMAGE_INCLUDE_DIRS ${XDAMAGE_INCLUDE_DIR} ) +endif() + +mark_as_advanced(XDAMAGE_INCLUDE_DIR XDAMAGE_LIBRARY)