diff options
Diffstat (limited to 'CMake/FindPango.cmake')
-rw-r--r-- | CMake/FindPango.cmake | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/CMake/FindPango.cmake b/CMake/FindPango.cmake deleted file mode 100644 index eb296d75..00000000 --- a/CMake/FindPango.cmake +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
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 | find_package(PkgConfig) | ||
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_check_modules(PANGO ${_pkgconfig_REQUIRED} "pango>=${PANGO_MIN_VERSION}" "pangocairo>=${PANGO_MIN_VERSION}") | ||
21 | else(PANGO_MIN_VERSION) | ||
22 | pkg_check_modules(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 | else(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND) | ||
29 | # Make paths absolute https://stackoverflow.com/a/35476270 | ||
30 | # Important on FreeBSD because /usr/local/lib is not on /usr/bin/ld's default path | ||
31 | set(PANGO_LIBS_ABSOLUTE) | ||
32 | foreach(lib ${PANGO_LIBRARIES}) | ||
33 | set(var_name PANGO_${lib}_ABS) | ||
34 | find_library(${var_name} ${lib} ${PANGO_LIBRARY_DIRS}) | ||
35 | list(APPEND PANGO_LIBS_ABSOLUTE ${${var_name}}) | ||
36 | endforeach() | ||
37 | set(PANGO_LIBRARIES ${PANGO_LIBS_ABSOLUTE}) | ||
38 | endif(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND) | ||
39 | |||
40 | include(FindPackageHandleStandardArgs) | ||
41 | find_package_handle_standard_args(PANGO DEFAULT_MSG PANGO_LIBRARIES PANGO_INCLUDE_DIRS) | ||
42 | mark_as_advanced(PANGO_LIBRARIES PANGO_INCLUDE_DIRS) | ||