diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-02-28 14:56:19 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-03-01 10:45:59 +0100 |
| commit | 49a78bc482bc112248a05f0b1ea78bcf80403efa (patch) | |
| tree | f57c0c1a98e240a64cb2a05fdea19d6781a5ab87 /CMake/resources.cmake | |
| parent | 266b5e7cddaaca312b77abd5696e0281af3251c9 (diff) | |
Fix cairo build (autoconf + CMake) + README's
- rewrite to use pkg-config with both autoconf + CMake
- remove hardcoded library names
- fix build dependencies and search directories
- remove or replace old and unused variables
- update README files
To be done:
- implement fallback for autoconf/configure if pkg-config is missing
- fix pango build (uses cairo internally)
Diffstat (limited to 'CMake/resources.cmake')
| -rw-r--r-- | CMake/resources.cmake | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/CMake/resources.cmake b/CMake/resources.cmake index 3ec95b3b6..57173f206 100644 --- a/CMake/resources.cmake +++ b/CMake/resources.cmake @@ -2,7 +2,7 @@ # Resource definitions to build the FLTK project using CMake (www.cmake.org) # Written by Michael Surette # -# Copyright 1998-2020 by Bill Spitzak and others. +# Copyright 1998-2021 by Bill Spitzak and others. # # This library is free software. Distribution and use rights are outlined in # the file "COPYING" which should have been included with this file. If this @@ -35,7 +35,19 @@ macro (fl_find_header VAR HEADER) endif (NOT CMAKE_REQUIRED_QUIET) endmacro (fl_find_header) +####################################################################### +# Include FindPkgConfig for later use of pkg-config +####################################################################### + +include (FindPkgConfig) + +# fl_debug_var (PKG_CONFIG_FOUND) +# fl_debug_var (PKG_CONFIG_EXECUTABLE) +# fl_debug_var (PKG_CONFIG_VERSION_STRING) + +####################################################################### # Find header files... +####################################################################### fl_find_header (HAVE_ALSA_ASOUNDLIB_H alsa/asoundlib.h) fl_find_header (HAVE_DLFCN_H dlfcn.h) @@ -150,7 +162,6 @@ mark_as_advanced (FREETYPE_PATH) ####################################################################### # libraries -find_library (LIB_CAIRO cairo) find_library (LIB_dl dl) if ((NOT APPLE) OR OPTION_APPLE_X11) find_library (LIB_fontconfig fontconfig) @@ -163,7 +174,7 @@ find_library (LIB_jpeg jpeg) find_library (LIB_png png) find_library (LIB_zlib z) -mark_as_advanced (LIB_CAIRO LIB_dl LIB_fontconfig LIB_freetype) +mark_as_advanced (LIB_dl LIB_fontconfig LIB_freetype) mark_as_advanced (LIB_GL LIB_MesaGL LIB_GLEW) mark_as_advanced (LIB_jpeg LIB_png LIB_zlib) |
