aboutsummaryrefslogtreecommitdiff
path: root/CMake/FindCairo.cmake
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-06-19 11:08:07 +0200
committerThomas White <taw@physics.org>2018-06-19 11:08:07 +0200
commitff3c0b995b704eef615b36119afdf04d862c6ead (patch)
tree0822690598ed91b52ebf65db45fd449e4310a0dc /CMake/FindCairo.cmake
parentb48a3d9aba6ce80ce8f0b2121e815cc20015532a (diff)
Simplify pkg-config stuff
Use it directly (no fallbacks, at least not until someone really needs it). Also, use the full LDFLAGS instead of just LIBRARIES, because the former also includes the link directories.
Diffstat (limited to 'CMake/FindCairo.cmake')
-rw-r--r--CMake/FindCairo.cmake48
1 files changed, 0 insertions, 48 deletions
diff --git a/CMake/FindCairo.cmake b/CMake/FindCairo.cmake
deleted file mode 100644
index 01ba7d6c..00000000
--- a/CMake/FindCairo.cmake
+++ /dev/null
@@ -1,48 +0,0 @@
-# - Try to find the cairo library
-# Once done this will define
-#
-# CAIRO_FOUND - system has cairo
-# CAIRO_INCLUDE_DIRS - the cairo include directory
-# CAIRO_LIBRARIES - Link these to use cairo
-#
-# Define CAIRO_MIN_VERSION for which version desired.
-#
-
-include(FindPkgConfig)
-
-if(Cairo_FIND_REQUIRED)
- set(_pkgconfig_REQUIRED "REQUIRED")
-else(Cairo_FIND_REQUIRED)
- set(_pkgconfig_REQUIRED "")
-endif(Cairo_FIND_REQUIRED)
-
-if(CAIRO_MIN_VERSION)
- pkg_search_module(CAIRO ${_pkgconfig_REQUIRED} cairo>=${CAIRO_MIN_VERSION})
-else(CAIRO_MIN_VERSION)
- pkg_search_module(CAIRO ${_pkgconfig_REQUIRED} cairo)
-endif(CAIRO_MIN_VERSION)
-
-if(NOT CAIRO_FOUND AND NOT PKG_CONFIG_FOUND)
- FIND_PATH(CAIRO_INCLUDE_DIRS cairo.h)
- FIND_LIBRARY(CAIRO_LIBRARIES cairo)
-endif(NOT CAIRO_FOUND AND NOT PKG_CONFIG_FOUND)
-
-# Report results
-if(CAIRO_LIBRARIES AND CAIRO_INCLUDE_DIRS)
-
- set(CAIRO_FOUND 1)
- if(NOT Cairo_FIND_QUIETLY)
- message(STATUS "Found Cairo: includes '${CAIRO_INCLUDE_DIRS}', libraries '${CAIRO_LIBRARIES}'")
- endif(NOT Cairo_FIND_QUIETLY)
-
-else(CAIRO_LIBRARIES AND CAIRO_INCLUDE_DIRS)
-
- if(Cairo_FIND_REQUIRED)
- message(SEND_ERROR "Could not find Cairo")
- else(Cairo_FIND_REQUIRED)
- if(NOT Cairo_FIND_QUIETLY)
- message(STATUS "Could not find Cairo")
- endif(NOT Cairo_FIND_QUIETLY)
- endif(Cairo_FIND_REQUIRED)
-
-endif(CAIRO_LIBRARIES AND CAIRO_INCLUDE_DIRS)