FindXRender.cmake 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. # Copyright 2013 Corey Clayton <can.of.tuna@gmail.com>
  14. #
  15. # Licensed under the Apache License, Version 2.0 (the "License");
  16. # you may not use this file except in compliance with the License.
  17. # You may obtain a copy of the License at
  18. #
  19. # http://www.apache.org/licenses/LICENSE-2.0
  20. #
  21. # Unless required by applicable law or agreed to in writing, software
  22. # distributed under the License is distributed on an "AS IS" BASIS,
  23. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24. # See the License for the specific language governing permissions and
  25. # limitations under the License.
  26. #=============================================================================
  27. find_path(XRENDER_INCLUDE_DIR NAMES X11/extensions/Xrender.h
  28. PATHS /opt/X11/include
  29. DOC "The Xrender include directory")
  30. find_library(XRENDER_LIBRARY NAMES Xrender
  31. PATHS /opt/X11/lib
  32. DOC "The Xrender library")
  33. include(FindPackageHandleStandardArgs)
  34. FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xrender DEFAULT_MSG XRENDER_LIBRARY XRENDER_INCLUDE_DIR)
  35. if(XRENDER_FOUND)
  36. set(XRENDER_LIBRARIES ${XRENDER_LIBRARY})
  37. set(XRENDER_INCLUDE_DIRS ${XRENDER_INCLUDE_DIR})
  38. endif()
  39. mark_as_advanced(XRENDER_INCLUDE_DIR XRENDER_LIBRARY)