summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMake/fl_debug_pkg.cmake63
-rw-r--r--CMake/fl_debug_var.cmake3
-rw-r--r--CMakeLists.txt30
3 files changed, 94 insertions, 2 deletions
diff --git a/CMake/fl_debug_pkg.cmake b/CMake/fl_debug_pkg.cmake
new file mode 100644
index 000000000..c3cc697ad
--- /dev/null
+++ b/CMake/fl_debug_pkg.cmake
@@ -0,0 +1,63 @@
+#
+# Macro used by the CMake build system for the Fast Light Tool Kit (FLTK).
+#
+# Copyright 2022 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
+# file is missing or damaged, see the license at:
+#
+# https://www.fltk.org/COPYING.php
+#
+# Please see the following page on how to report bugs and issues:
+#
+# https://www.fltk.org/bugs.php
+#
+
+#######################################################################
+# fl_debug_pkg - a macro to output pkgconfig debugging info
+#######################################################################
+#
+# This macro displays the name and value of some CMake variables
+# defined by pkg_check_modules().
+#
+# Syntax:
+#
+# fl_debug_pkg(PREFIX NAME)
+#
+# Example for package "cairo":
+#
+# pkg_check_modules (CAIRO cairo)
+# fl_debug_pkg (CAIRO cairo)
+#
+# The first command searches for pkg 'cairo' and stores the results
+# in CMake variables with prefix 'CAIRO_'.
+#
+# The second command displays all relevant variables if the package has
+# been found, otherwise only 'CAIRO_FOUND' (empty or false).
+#
+#######################################################################
+
+macro (fl_debug_pkg PREFIX NAME)
+ message("")
+ message(STATUS "Results of pkg_check_modules(${PREFIX}, ${NAME}):")
+ fl_debug_var (${PREFIX}_FOUND)
+ if (${PREFIX}_FOUND)
+
+ fl_debug_var (${PREFIX}_LIBRARIES)
+ fl_debug_var (${PREFIX}_LINK_LIBRARIES)
+ fl_debug_var (${PREFIX}_LIBRARY_DIRS)
+ fl_debug_var (${PREFIX}_LDFLAGS)
+ fl_debug_var (${PREFIX}_LDFLAGS_OTHER)
+ fl_debug_var (${PREFIX}_INCLUDE_DIRS)
+ fl_debug_var (${PREFIX}_CFLAGS)
+ fl_debug_var (${PREFIX}_CFLAGS_OTHER)
+
+ fl_debug_var (${PREFIX}_VERSION)
+ fl_debug_var (${PREFIX}_PREFIX)
+ fl_debug_var (${PREFIX}_INCLUDEDIR)
+ fl_debug_var (${PREFIX}_LIBDIR)
+
+ endif ()
+ message("")
+endmacro (fl_debug_pkg)
diff --git a/CMake/fl_debug_var.cmake b/CMake/fl_debug_var.cmake
index 865f2a895..23417ede3 100644
--- a/CMake/fl_debug_var.cmake
+++ b/CMake/fl_debug_var.cmake
@@ -1,8 +1,7 @@
#
# Macro used by the CMake build system for the Fast Light Tool Kit (FLTK).
-# Written by Michael Surette
#
-# Copyright 1998-2020 by Bill Spitzak and others.
+# Copyright 1998-2022 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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1c8f3d160..c871386e7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,7 @@ project (FLTK VERSION 1.4.0)
#######################################################################
include (CMake/fl_debug_var.cmake)
+include (CMake/fl_debug_pkg.cmake)
include (CMake/fl_add_library.cmake)
include (CMake/compatibility.cmake)
@@ -237,5 +238,34 @@ else ()
message (STATUS " ZLIB = System")
endif ()
+if (UNIX)
+
+ if (OPTION_USE_WAYLAND)
+ message (STATUS "Use Wayland: Yes")
+ else ()
+ message (STATUS "Use Wayland: No")
+ endif ()
+
+ if (USE_PANGO)
+ message (STATUS "Use Pango: Yes")
+ else (USE_PANGO)
+ message (STATUS "Use Pango: No")
+ if (USE_XFT)
+ message (STATUS "Use Xft: Yes")
+ else ()
+ message (STATUS "Use Xft: No")
+ endif (USE_XFT)
+ endif (USE_PANGO)
+
+endif (UNIX)
+
+if (FLTK_HAVE_CAIROEXT)
+ message (STATUS "Cairo support: Yes (extended)")
+elseif (FLTK_HAVE_CAIRO)
+ message (STATUS "Cairo support: Yes (standard)")
+else ()
+ message (STATUS "Cairo support: No")
+endif ()
+
message ("")
message (STATUS "End of Configuration Summary --\n")