diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2015-01-16 02:08:18 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2015-01-16 02:08:18 +0200 |
commit | a54bcf694ad152ba0a5c1c3f2de6bc9c82bba02f (patch) | |
tree | 035ff1c1db386e48135705b5c663060248b3fa66 /CMake | |
parent | 20189fb8d26e422bf17dda4264e84ed7b1b2a340 (diff) | |
parent | ada6edc175eb89d318e55204368e2ba5dad07b1b (diff) | |
download | bemenu-a54bcf694ad152ba0a5c1c3f2de6bc9c82bba02f.tar.gz bemenu-a54bcf694ad152ba0a5c1c3f2de6bc9c82bba02f.tar.bz2 bemenu-a54bcf694ad152ba0a5c1c3f2de6bc9c82bba02f.zip |
Merge branch 'pango-wip'
Diffstat (limited to 'CMake')
-rw-r--r-- | CMake/FindPango.cmake | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/CMake/FindPango.cmake b/CMake/FindPango.cmake new file mode 100644 index 0000000..64bf9ac --- /dev/null +++ b/CMake/FindPango.cmake @@ -0,0 +1,47 @@ +# - Try to find the pango library +# Once done this will define +# +# PANGO_FOUND - system has pango +# PANGO_INCLUDE_DIRS - the pango include directory +# PANGO_LIBRARIES - Link these to use pango +# +# Define PANGO_MIN_VERSION for which version desired. +# + +INCLUDE(FindPkgConfig) + +IF(Pango_FIND_REQUIRED) + SET(_pkgconfig_REQUIRED "REQUIRED") +ELSE(Pango_FIND_REQUIRED) + SET(_pkgconfig_REQUIRED "") +ENDIF(Pango_FIND_REQUIRED) + +IF(PANGO_MIN_VERSION) + PKG_SEARCH_MODULE(PANGO ${_pkgconfig_REQUIRED} "pango>=${PANGO_MIN_VERSION} pangocairo>=${PANGO_MIN_VERSION}") +ELSE(PANGO_MIN_VERSION) + PKG_SEARCH_MODULE(PANGO ${_pkgconfig_REQUIRED} "pango pangocairo") +ENDIF(PANGO_MIN_VERSION) + +IF(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND) + FIND_PATH(PANGO_INCLUDE_DIRS pango.h) + FIND_LIBRARY(PANGO_LIBRARIES pango pangocairo) + + # Report results + IF(PANGO_LIBRARIES AND PANGO_INCLUDE_DIRS) + SET(PANGO_FOUND 1) + IF(NOT Pango_FIND_QUIETLY) + MESSAGE(STATUS "Found Pango: ${PANGO_LIBRARIES}") + ENDIF(NOT Pango_FIND_QUIETLY) + ELSE(PANGO_LIBRARIES AND PANGO_INCLUDE_DIRS) + IF(Pango_FIND_REQUIRED) + MESSAGE(SEND_ERROR "Could not find Pango") + ELSE(Pango_FIND_REQUIRED) + IF(NOT Pango_FIND_QUIETLY) + MESSAGE(STATUS "Could not find Pango") + ENDIF(NOT Pango_FIND_QUIETLY) + ENDIF(Pango_FIND_REQUIRED) + ENDIF(PANGO_LIBRARIES AND PANGO_INCLUDE_DIRS) +ENDIF(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND) + +# Hide advanced variables from CMake GUIs +MARK_AS_ADVANCED(PANGO_LIBRARIES PANGO_INCLUDE_DIRS) |