Backported #6865: Disable websockets command line option
[platform/upstream/freerdp.git] / cmake / FindXrender.cmake
1 # - Find XRender
2 # Find the XRender libraries
3 #
4 # This module defines the following variables:
5 #       XRENDER_FOUND - true if XRENDER_INCLUDE_DIR & XRENDER_LIBRARY are found
6 #       XRENDER_LIBRARIES - Set when Xrender_LIBRARY is found
7 #       XRENDER_INCLUDE_DIRS - Set when Xrender_INCLUDE_DIR is found
8 #
9 #       XRENDER_INCLUDE_DIR - where to find Xrender.h, etc.
10 #       XRENDER_LIBRARY - the Xrender library
11 #
12
13 #=============================================================================
14 # Copyright 2013 Corey Clayton <can.of.tuna@gmail.com>
15 #
16 # Licensed under the Apache License, Version 2.0 (the "License");
17 # you may not use this file except in compliance with the License.
18 # You may obtain a copy of the License at
19 #
20 #     http://www.apache.org/licenses/LICENSE-2.0
21 #
22 # Unless required by applicable law or agreed to in writing, software
23 # distributed under the License is distributed on an "AS IS" BASIS,
24 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 # See the License for the specific language governing permissions and
26 # limitations under the License.
27 #=============================================================================
28
29 find_path(XRENDER_INCLUDE_DIR NAMES X11/extensions/Xrender.h
30           PATHS /opt/X11/include
31           DOC "The Xrender include directory")
32
33 find_library(XRENDER_LIBRARY NAMES Xrender
34           PATHS /opt/X11/lib
35           DOC "The Xrender library")
36
37 include(FindPackageHandleStandardArgs)
38 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xrender DEFAULT_MSG XRENDER_LIBRARY XRENDER_INCLUDE_DIR)
39
40 if(XRENDER_FOUND)
41
42         set(XRENDER_LIBRARIES ${XRENDER_LIBRARY})
43         set(XRENDER_INCLUDE_DIRS ${XRENDER_INCLUDE_DIR})
44
45 endif()
46
47 mark_as_advanced(XRENDER_INCLUDE_DIR XRENDER_LIBRARY)