diff options
author | 2017-12-01 08:21:01 -0500 | |
---|---|---|
committer | 2017-12-01 08:21:01 -0500 | |
commit | 1cfebe827ae53a243ffdd1e09f8b71d4c1a4e254 (patch) | |
tree | b74002984ff80201c02ed9c22ca2fe1cdae98e23 /CMake/FindGdkPixbuf.cmake | |
parent | Merge pull request #1482 from acrisci/refactor/use-frame-done (diff) | |
parent | update travis (diff) | |
download | sway-1cfebe827ae53a243ffdd1e09f8b71d4c1a4e254.tar.gz sway-1cfebe827ae53a243ffdd1e09f8b71d4c1a4e254.tar.zst sway-1cfebe827ae53a243ffdd1e09f8b71d4c1a4e254.zip |
Merge pull request #1479 from acrisci/feature/meson-build
meson build
Diffstat (limited to 'CMake/FindGdkPixbuf.cmake')
-rw-r--r-- | CMake/FindGdkPixbuf.cmake | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/CMake/FindGdkPixbuf.cmake b/CMake/FindGdkPixbuf.cmake deleted file mode 100644 index 9cad4f92..00000000 --- a/CMake/FindGdkPixbuf.cmake +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | # - Try to find the gdk-pixbuf-2.0 library | ||
2 | # Once done this will define | ||
3 | # | ||
4 | # GDK_PIXBUF_FOUND - system has gdk-pixbuf-2.0 | ||
5 | # GDK_PIXBUF_INCLUDE_DIRS - the gdk-pixbuf-2.0 include directory | ||
6 | # GDK_PIXBUF_LIBRARIES - Link these to use gdk-pixbuf-2.0 | ||
7 | # | ||
8 | # Define GDK_PIXBUF_MIN_VERSION for which version desired. | ||
9 | # | ||
10 | |||
11 | find_package(PkgConfig) | ||
12 | |||
13 | if(GdkPixbuf_FIND_REQUIRED) | ||
14 | set(_pkgconfig_REQUIRED "REQUIRED") | ||
15 | else(GdkPixbuf_FIND_REQUIRED) | ||
16 | set(_pkgconfig_REQUIRED "") | ||
17 | endif(GdkPixbuf_FIND_REQUIRED) | ||
18 | |||
19 | if(GDK_PIXBUF_MIN_VERSION) | ||
20 | pkg_check_modules(GDK_PIXBUF ${_pkgconfig_REQUIRED} "gdk-pixbuf-2.0>=${GDK_PIXBUF_MIN_VERSION}") | ||
21 | else(GDK_PIXBUF_MIN_VERSION) | ||
22 | pkg_check_modules(GDK_PIXBUF ${_pkgconfig_REQUIRED} "gdk-pixbuf-2.0") | ||
23 | endif(GDK_PIXBUF_MIN_VERSION) | ||
24 | |||
25 | if(NOT GDK_PIXBUF_FOUND AND NOT PKG_CONFIG_FOUND) | ||
26 | find_path(GDK_PIXBUF_INCLUDE_DIRS gdk-pixbuf/gdk-pixbuf.h) | ||
27 | find_library(GDK_PIXBUF_LIBRARIES gdk_pixbuf-2.0) | ||
28 | else(NOT GDK_PIXBUF_FOUND AND NOT PKG_CONFIG_FOUND) | ||
29 | SET(GdkPixbuf_FOUND 1) | ||
30 | # Make paths absolute https://stackoverflow.com/a/35476270 | ||
31 | # Important on FreeBSD because /usr/local/lib is not on /usr/bin/ld's default path | ||
32 | set(GDK_PIXBUF_LIBS_ABSOLUTE) | ||
33 | foreach(lib ${GDK_PIXBUF_LIBRARIES}) | ||
34 | set(var_name GDK_PIXBUF_${lib}_ABS) | ||
35 | find_library(${var_name} ${lib} ${GDK_PIXBUF_LIBRARY_DIRS}) | ||
36 | list(APPEND GDK_PIXBUF_LIBS_ABSOLUTE ${${var_name}}) | ||
37 | endforeach() | ||
38 | set(GDK_PIXBUF_LIBRARIES ${GDK_PIXBUF_LIBS_ABSOLUTE}) | ||
39 | endif(NOT GDK_PIXBUF_FOUND AND NOT PKG_CONFIG_FOUND) | ||
40 | |||
41 | include(FindPackageHandleStandardArgs) | ||
42 | find_package_handle_standard_args(GDK_PIXBUF DEFAULT_MSG GDK_PIXBUF_LIBRARIES GDK_PIXBUF_INCLUDE_DIRS) | ||
43 | mark_as_advanced(GDK_PIXBUF_LIBRARIES GDK_PIXBUF_INCLUDE_DIRS) | ||