diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-11-12 08:17:52 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-11-12 08:17:52 -0500 |
commit | aadcba4b7cfa9ce3096fd166a046b151fd5ba8fa (patch) | |
tree | 62968b4f9a22d275965605cba155afbb69892ee0 /CMake/FindPango.cmake | |
parent | Fix gaps for views being incorrect (diff) | |
download | sway-aadcba4b7cfa9ce3096fd166a046b151fd5ba8fa.tar.gz sway-aadcba4b7cfa9ce3096fd166a046b151fd5ba8fa.tar.zst sway-aadcba4b7cfa9ce3096fd166a046b151fd5ba8fa.zip |
Add new dependencies for wayland clients
Cairo for rendering shit, Pango for text rendering, and wayland client
stuff. Thanks @Cloudef, blatantly ripping off his cmake files for this
Diffstat (limited to 'CMake/FindPango.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 00000000..64bf9ac4 --- /dev/null +++ b/CMake/FindPango.cmake | |||
@@ -0,0 +1,47 @@ | |||
1 | # - Try to find the pango library | ||
2 | # Once done this will define | ||
3 | # | ||
4 | # PANGO_FOUND - system has pango | ||
5 | # PANGO_INCLUDE_DIRS - the pango include directory | ||
6 | # PANGO_LIBRARIES - Link these to use pango | ||
7 | # | ||
8 | # Define PANGO_MIN_VERSION for which version desired. | ||
9 | # | ||
10 | |||
11 | INCLUDE(FindPkgConfig) | ||
12 | |||
13 | IF(Pango_FIND_REQUIRED) | ||
14 | SET(_pkgconfig_REQUIRED "REQUIRED") | ||
15 | ELSE(Pango_FIND_REQUIRED) | ||
16 | SET(_pkgconfig_REQUIRED "") | ||
17 | ENDIF(Pango_FIND_REQUIRED) | ||
18 | |||
19 | IF(PANGO_MIN_VERSION) | ||
20 | PKG_SEARCH_MODULE(PANGO ${_pkgconfig_REQUIRED} "pango>=${PANGO_MIN_VERSION} pangocairo>=${PANGO_MIN_VERSION}") | ||
21 | ELSE(PANGO_MIN_VERSION) | ||
22 | PKG_SEARCH_MODULE(PANGO ${_pkgconfig_REQUIRED} "pango pangocairo") | ||
23 | ENDIF(PANGO_MIN_VERSION) | ||
24 | |||
25 | IF(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND) | ||
26 | FIND_PATH(PANGO_INCLUDE_DIRS pango.h) | ||
27 | FIND_LIBRARY(PANGO_LIBRARIES pango pangocairo) | ||
28 | |||
29 | # Report results | ||
30 | IF(PANGO_LIBRARIES AND PANGO_INCLUDE_DIRS) | ||
31 | SET(PANGO_FOUND 1) | ||
32 | IF(NOT Pango_FIND_QUIETLY) | ||
33 | MESSAGE(STATUS "Found Pango: ${PANGO_LIBRARIES}") | ||
34 | ENDIF(NOT Pango_FIND_QUIETLY) | ||
35 | ELSE(PANGO_LIBRARIES AND PANGO_INCLUDE_DIRS) | ||
36 | IF(Pango_FIND_REQUIRED) | ||
37 | MESSAGE(SEND_ERROR "Could not find Pango") | ||
38 | ELSE(Pango_FIND_REQUIRED) | ||
39 | IF(NOT Pango_FIND_QUIETLY) | ||
40 | MESSAGE(STATUS "Could not find Pango") | ||
41 | ENDIF(NOT Pango_FIND_QUIETLY) | ||
42 | ENDIF(Pango_FIND_REQUIRED) | ||
43 | ENDIF(PANGO_LIBRARIES AND PANGO_INCLUDE_DIRS) | ||
44 | ENDIF(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND) | ||
45 | |||
46 | # Hide advanced variables from CMake GUIs | ||
47 | MARK_AS_ADVANCED(PANGO_LIBRARIES PANGO_INCLUDE_DIRS) | ||