From ff3c0b995b704eef615b36119afdf04d862c6ead Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 19 Jun 2018 11:08:07 +0200 Subject: 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. --- CMake/FindCairo.cmake | 48 ------------------------------------------- CMake/FindFFTW.cmake | 20 ------------------ CMake/FindGDK.cmake | 51 ---------------------------------------------- CMake/FindGdkPixbuf2.cmake | 51 ---------------------------------------------- 4 files changed, 170 deletions(-) delete mode 100644 CMake/FindCairo.cmake delete mode 100644 CMake/FindFFTW.cmake delete mode 100644 CMake/FindGDK.cmake delete mode 100644 CMake/FindGdkPixbuf2.cmake (limited to 'CMake') 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) diff --git a/CMake/FindFFTW.cmake b/CMake/FindFFTW.cmake deleted file mode 100644 index faccfda5..00000000 --- a/CMake/FindFFTW.cmake +++ /dev/null @@ -1,20 +0,0 @@ -# - Find FFTW -# Find the native FFTW includes and library -# -# FFTW_INCLUDES - where to find fftw3.h -# FFTW_LIBRARIES - List of libraries when using FFTW. -# FFTW_FOUND - True if FFTW found. - -if (FFTW_INCLUDES) - # Already in cache, be silent - set (FFTW_FIND_QUIETLY TRUE) -endif (FFTW_INCLUDES) - -find_path (FFTW_INCLUDES fftw3.h) - -find_library (FFTW_LIBRARIES NAMES fftw3) - -# handle the QUIETLY and REQUIRED arguments and set FFTW_FOUND to TRUE if -# all listed variables are TRUE -include (FindPackageHandleStandardArgs) -find_package_handle_standard_args (FFTW DEFAULT_MSG FFTW_LIBRARIES FFTW_INCLUDES) diff --git a/CMake/FindGDK.cmake b/CMake/FindGDK.cmake deleted file mode 100644 index 5de42303..00000000 --- a/CMake/FindGDK.cmake +++ /dev/null @@ -1,51 +0,0 @@ -# - Try to find the GDK library -# Once done this will define -# -# GDK_FOUND - system has gdk -# GDK_INCLUDE_DIRS - the gdk include directory -# GDK_LIBRARIES - Link these to use gdk -# -# Define GDK_MIN_VERSION for which version desired. -# - -include(FindPkgConfig) - -if (GDK_FIND_REQUIRED) - set(_pkgconfig_REQUIRED "REQUIRED") -else (GDK_FIND_REQUIRED) - set(_pkgconfig_REQUIRED "") -endif (GDK_FIND_REQUIRED) - -if (GDK_MIN_VERSION) - pkg_search_module(GDK ${_pkgconfig_REQUIRED} gdk-2.0>=${GDK_MIN_VERSION}) -else (GDK_MIN_VERSION) - pkg_search_module(GDK ${_pkgconfig_REQUIRED} gdk-2.0) -endif (GDK_MIN_VERSION) - -if (GDK_FOUND) - message(STATUS "Found GDK (using pkg-config): ${GDK_LIBRARIES}") -endif (GDK_FOUND) - -# Backup option if we don't have pkg-config -if (NOT GDK_FOUND AND NOT PKG_CONFIG_FOUND) - - find_path(GDK_INCLUDE_DIRS gdk/gdk.h) - find_library(GDK_LIBRARIES gdk) - - if (GDK_LIBRARIES AND GDK_INCLUDE_DIRS) - set(GDK_FOUND 1) - if (NOT GDK_FIND_QUIETLY) - message(STATUS "Found GDK_LIBRARIES}") - endif(NOT GDK_FIND_QUIETLY) - else (GDK_LIBRARIES AND GDK_INCLUDE_DIRS) - if (GDK_FIND_REQUIRED) - message(SEND_ERROR "Could not find GDK") - else (GDK_FIND_REQUIRED) - if (NOT GDK_FIND_QUIETLY) - message(STATUS "Could not find GDK") - endif (NOT GDK_FIND_QUIETLY) - endif (GDK_FIND_REQUIRED) - endif (GDK_LIBRARIES AND GDK_INCLUDE_DIRS) - -endif (NOT GDK_FOUND AND NOT PKG_CONFIG_FOUND) - diff --git a/CMake/FindGdkPixbuf2.cmake b/CMake/FindGdkPixbuf2.cmake deleted file mode 100644 index dea84f4e..00000000 --- a/CMake/FindGdkPixbuf2.cmake +++ /dev/null @@ -1,51 +0,0 @@ -# - Try to find the gdk-pixbuf-2.0 library -# Once done this will define -# -# GDKPIXBUF_FOUND - system has gdk-pixbuf -# GDKPIXBUF_INCLUDE_DIRS - the gdk-pixbuf include directory -# GDKPIXBUF_LIBRARIES - Link these to use gdk-pixbuf -# -# Define GDKPIXBUF_MIN_VERSION for which version desired. -# - -include(FindPkgConfig) - -if (GdkPixbuf2_FIND_REQUIRED) - set(_pkgconfig_REQUIRED "REQUIRED") -else (GdkPixbuf2_FIND_REQUIRED) - set(_pkgconfig_REQUIRED "") -endif (GdkPixbuf2_FIND_REQUIRED) - -if (GDKPIXBUF_MIN_VERSION) - pkg_search_module(GDKPIXBUF ${_pkgconfig_REQUIRED} gdk-pixbuf-2.0>=${GDKPIXBUF_MIN_VERSION}) -else (GDKPIXBUF_MIN_VERSION) - pkg_search_module(GDKPIXBUF ${_pkgconfig_REQUIRED} gdk-pixbuf-2.0) -endif (GDKPIXBUF_MIN_VERSION) - -if (GDKPIXBUF_FOUND) - message(STATUS "Found GdkPixbuf2 (using pkg-config): ${GDKPIXBUF_LIBRARIES}") -endif (GDKPIXBUF_FOUND) - -# Backup option if we don't have pkg-config -if (NOT GDKPIXBUF_FOUND AND NOT PKG_CONFIG_FOUND) - - find_path(GDKPIXBUF_INCLUDE_DIRS gdk-pixbuf/gdk-pixbuf.h) - find_library(GDKPIXBUF_LIBRARIES gdk-pixbuf) - - if (GDKPIXBUF_LIBRARIES AND GDKPIXBUF_INCLUDE_DIRS) - set(GDKPIXBUF_FOUND 1) - if (NOT GdkPixbuf2_FIND_QUIETLY) - message(STATUS "Found GdkPixbuf2: ${GDKPIXBUF_LIBRARIES}") - endif(NOT GdkPixbuf2_FIND_QUIETLY) - else (GDKPIXBUF_LIBRARIES AND GDKPIXBUF_INCLUDE_DIRS) - if (GdkPixbuf2_FIND_REQUIRED) - message(SEND_ERROR "Could not find GdkPixbuf2") - else (GdkPixbuf2_FIND_REQUIRED) - if (NOT GdkPixbuf2_FIND_QUIETLY) - message(STATUS "Could not find GdkPixbuf2") - endif (NOT GdkPixbuf2_FIND_QUIETLY) - endif (GdkPixbuf2_FIND_REQUIRED) - endif (GDKPIXBUF_LIBRARIES AND GDKPIXBUF_INCLUDE_DIRS) - -endif (NOT GDKPIXBUF_FOUND AND NOT PKG_CONFIG_FOUND) - -- cgit v1.2.3