diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2025-03-15 23:34:56 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2025-03-16 00:10:53 +0100 |
| commit | b252e5e45cfd87da48133a3a52e3ac164759b231 (patch) | |
| tree | 16be1e15561e913e9e9c023a170bb9b062d5bfc8 | |
| parent | 2e1730d2f0f131d792c9b0561672f5252a868785 (diff) | |
Remove libfltk_cairo (fltk::cairo)
This library is no longer needed and was "empty" for backwards
compatibility since FLTK 1.4.0.
| -rw-r--r-- | .github/ISSUE_TEMPLATE/bug_report.md | 10 | ||||
| -rw-r--r-- | CMake/FLTKConfig.cmake.in | 2 | ||||
| -rw-r--r-- | CMake/fl_create_example.cmake | 16 | ||||
| -rw-r--r-- | CMake/options.cmake | 2 | ||||
| -rw-r--r-- | CMakeLists.txt | 12 | ||||
| -rw-r--r-- | FL/Fl.H | 16 | ||||
| -rw-r--r-- | FL/Fl_Cairo.H | 7 | ||||
| -rw-r--r-- | FL/Fl_Cairo_Window.H | 4 | ||||
| -rw-r--r-- | README.CMake.txt | 8 | ||||
| -rw-r--r-- | README.Wayland.txt | 2 | ||||
| -rw-r--r-- | cairo/CMakeLists.txt | 43 | ||||
| -rw-r--r-- | cairo/cairo_dummy.c | 28 | ||||
| -rw-r--r-- | documentation/src/basics.dox | 8 | ||||
| -rw-r--r-- | examples/cairo-draw-x.cxx | 4 | ||||
| -rw-r--r-- | fl_config.cmake.in | 4 |
15 files changed, 33 insertions, 133 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d43b8f8ce..cb1f70b95 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,7 +7,7 @@ assignees: '' --- -**Describe the bug** +**Description of the Bug Report** A clear and concise description of what the bug is. **To Reproduce** @@ -38,11 +38,9 @@ Please complete the following information and delete non-applicable lines: - If from Git, commit: [e.g. 7d58e2385452] **FLTK Configure / Build Options** -Please add the complete configure and build command lines if you built FLTK yourself. -Please include all configure or CMake options and add all CMake options you changed -by using CMake GUI tools (if any). - - ./configure --enable-cairo ... - - cmake -G"..." -DCMAKE_BUILD_TYPE=Debug ... +Please add the complete CMake and build command lines if you built FLTK yourself. +Please add all CMake options you changed by using CMake GUI tools (if any). + - cmake -G"..." -D CMAKE_BUILD_TYPE=Debug ... **Operating System / Platform:** Please be as precise as possible, e.g. "Linux: Ubuntu 20.04" diff --git a/CMake/FLTKConfig.cmake.in b/CMake/FLTKConfig.cmake.in index 0eef0585a..14876d3a0 100644 --- a/CMake/FLTKConfig.cmake.in +++ b/CMake/FLTKConfig.cmake.in @@ -117,7 +117,7 @@ else(CMAKE_CROSSCOMPILING) _fltk_make_alias(fltk-options fltk::options) _fltk_make_alias(fltk-options-cmd fltk::options-cmd) - foreach(target cairo forms gl images jpeg png z) + foreach(target forms gl images jpeg png z) _fltk_make_alias(fltk_${target} fltk::${target}) _fltk_make_alias(fltk_${target}-shared fltk::${target}-shared) endforeach() diff --git a/CMake/fl_create_example.cmake b/CMake/fl_create_example.cmake index 854f02e59..571e33b43 100644 --- a/CMake/fl_create_example.cmake +++ b/CMake/fl_create_example.cmake @@ -2,7 +2,7 @@ # A function used by the CMake build system for the Fast Light Tool Kit (FLTK). # Originally written by Michael Surette # -# Copyright 1998-2024 by Bill Spitzak and others. +# Copyright 1998-2025 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 @@ -114,20 +114,6 @@ function(fl_create_example NAME SOURCES LIBRARIES) set_target_properties (${TARGET_NAME} PROPERTIES ENABLE_EXPORTS TRUE) - ### *FIXME* Remove the entire 'if' block below when verified: - - if(0) # This should no longer be necessary (implied by linking the libs) - - # we must link all programs with Cairo if option CAIROEXT is enabled - if(FLTK_HAVE_CAIROEXT) - target_link_libraries(${TARGET_NAME} PRIVATE ${PKG_CAIRO_LIBRARIES}) - endif() - - if(FLTK_HAVE_CAIRO AND PKG_CAIRO_LIBRARY_DIRS) - target_link_directories(${TARGET_NAME} PRIVATE ${PKG_CAIRO_LIBRARY_DIRS}) - endif() - - endif() # This should no longer be necessary (implied by linking the libs) # Search the current binary directory for header files created by CMake # or fluid and the source folder for other headers included by test programs diff --git a/CMake/options.cmake b/CMake/options.cmake index a9c41264d..aa4936b65 100644 --- a/CMake/options.cmake +++ b/CMake/options.cmake @@ -29,7 +29,7 @@ # which can be applied to particular targets and source files only. # # This could remove some of these potential build conflicts, for -# instance # if the bundled image libs and Cairo or Pango are used +# instance if the bundled image libs and Cairo or Pango are used # together (Pango depends on Cairo and Cairo depends on libpng). # However, this is not a proper solution! # diff --git a/CMakeLists.txt b/CMakeLists.txt index 09994ac5e..4ca5f0862 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,16 +141,6 @@ endif(debug_build) unset(debug_build) ####################################################################### -# Build a dummy ("empty") Cairo library for backwards compatibility. -# This should be removed in the next minor release after 1.4.x, likely -# in FLTK 1.5.0. -####################################################################### - -if(FLTK_HAVE_CAIRO) - add_subdirectory(cairo) -endif() - -####################################################################### # build the standard FLTK libraries ####################################################################### @@ -380,7 +370,7 @@ message(STATUS "End of Configuration Summary --\n") if(0) # debug built library and fluid targets message(STATUS "------------------------ TARGETS ------------------------") - foreach(tgt fltk fluid fluid-cmd options options-cmd images gl forms cairo jpeg png z) + foreach(tgt fltk fluid fluid-cmd options options-cmd images gl forms jpeg png z) if(TARGET fltk::${tgt}) message("Target: fltk::${tgt}") # fl_debug_target(fltk::${tgt}) @@ -1,7 +1,7 @@ // // Main header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2024 by Bill Spitzak and others. +// Copyright 1998-2025 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 @@ -1449,7 +1449,7 @@ public: In this last case, you don't need anymore to call Fl::cairo_make_current(). You can use Fl::cairo_cc() to get the current Cairo context anytime. - \note Only available when configure has the --enable-cairo option + \note Only available if built with CMake option FLTK_OPTION_CAIRO_WINDOW=ON. */ static void cairo_autolink_context(bool alink) { cairo_state_.autolink(alink); @@ -1460,8 +1460,9 @@ public: \retval false if no Cairo context autolink is made for each window. \retval true if any fltk window is attached a Cairo context when it is current. \see void cairo_autolink_context(bool alink) - \note Only available when configure has the --enable-cairo option - */ + + \note Only available if built with CMake option FLTK_OPTION_CAIRO_EXT=ON. + */ static bool cairo_autolink_context() { return cairo_state_.autolink(); } @@ -1473,7 +1474,8 @@ public: /** Sets the current Cairo context to \p c. Set \p own to true if you want fltk to handle this cc deletion. - \note Only available when configure has the --enable-Cairo option + + \note Only available if built with CMake option FLTK_OPTION_CAIRO_WINDOW=ON. */ static void cairo_cc(cairo_t *c, bool own=false) { cairo_state_.cc(c, own); @@ -1498,8 +1500,8 @@ public: Fl::cairo_flush(cc); // flush Cairo drawings to the device \endcode - If you configure FLTK with \c '--enable-cairo' or CMake option - \c 'FLTK_OPTION_CAIRO_WINDOW' (i.e. without \c '--enable-cairoext' or CMake option + If you configure FLTK with CMake option + \c 'FLTK_OPTION_CAIRO_WINDOW' (i.e. without CMake option \c 'FLTK_OPTION_CAIRO_EXT') or if you don't enable the \c 'autolink' Cairo context you may do the equivalent to use Cairo drawings in an overridden draw() method of derived classes by using diff --git a/FL/Fl_Cairo.H b/FL/Fl_Cairo.H index cf43de421..51639c980 100644 --- a/FL/Fl_Cairo.H +++ b/FL/Fl_Cairo.H @@ -1,7 +1,7 @@ // // Main Cairo support header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2023 by Bill Spitzak and others. +// Copyright 1998-2025 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 @@ -49,9 +49,8 @@ A private internal & unique corresponding object is created to permit cairo context state handling while keeping it opaque. For internal use only. - \note Only available when configure has the --enable-cairo or - --enable-cairoext option or one or both of the CMake options - FLTK_OPTION_CAIRO_WINDOW or FLTK_OPTION_CAIRO_EXT is set (ON) + \note Only available if one or both of the CMake options + FLTK_OPTION_CAIRO_WINDOW or FLTK_OPTION_CAIRO_EXT is set (ON). */ class FL_EXPORT Fl_Cairo_State { public: diff --git a/FL/Fl_Cairo_Window.H b/FL/Fl_Cairo_Window.H index ebffb51ce..658819175 100644 --- a/FL/Fl_Cairo_Window.H +++ b/FL/Fl_Cairo_Window.H @@ -1,7 +1,7 @@ // // Fl_Cairo_Window header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2023 by Bill Spitzak and others. +// Copyright 1998-2025 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 @@ -78,7 +78,7 @@ \see test/cairo_test.cxx \note Class Fl_Cairo_Window requires the FLTK library to have been built with - CMake option FLTK_OPTION_CAIRO_WINDOW or configure --enable-cairo. + CMake option FLTK_OPTION_CAIRO_WINDOW or FLTK_OPTION_CAIRO_EXT. \note You can alternatively define your custom Cairo FLTK window, and thus at least override the draw() method to provide custom Cairo diff --git a/README.CMake.txt b/README.CMake.txt index d309e8c83..f36e39b0d 100644 --- a/README.CMake.txt +++ b/README.CMake.txt @@ -825,10 +825,10 @@ specific prefixes and postfixes. For instance, on Linux/Unix 'fltk' is libfltk.a and the shared library (fltk-shared) is libfltk.so.1.4.0 (in FLTK 1.4.0) with additional system specific links. -Note: since FLTK 1.4.0 the library fltk_cairo is no longer necessary and -should be removed from CMake files of user projects. fltk_cairo is now an -empty library solely for backwards compatibility and will be removed in the -future. +Note: since FLTK 1.5.0 the library fltk_cairo is no longer necessary and +must be removed from CMake files of user projects. fltk_cairo was an +empty library solely for backwards compatibility in FLTK 1.4 and has been +removed from FLTK 1.5. 3.2 Library Aliases diff --git a/README.Wayland.txt b/README.Wayland.txt index 4e9f98fb1..026a5b084 100644 --- a/README.Wayland.txt +++ b/README.Wayland.txt @@ -36,7 +36,7 @@ CJK text-input methods, as well as dead and compose keys are supported. On Linux and FreeBSD systems, the FLTK library is by default configured so FLTK apps do all their windowing through the Wayland protocol, all their graphics -withCairo or EGL, and all text-drawing with Pango. If no Wayland compositor +with Cairo or EGL, and all text-drawing with Pango. If no Wayland compositor is available at run-time, FLTK apps fall back to using X11 for windowing. Cairo and Pango remain used for graphics and text, respectively. diff --git a/cairo/CMakeLists.txt b/cairo/CMakeLists.txt deleted file mode 100644 index 1e1c1a02b..000000000 --- a/cairo/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -# -# CMakeLists.txt to build a dummy Cairo library for the FLTK project using CMake -# -# Copyright 1998-2023 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 -# - -######################################################################## -# Note: since FLTK 1.4.0 Fl_Cairo_Window support [1] is included in -# libfltk and libfltk_cairo is no longer necessary. This directory is -# used to build an "empty" dummy library for backwards compatibility, -# just in case users expect it to exist. -# ---------------------------------------------------------------------- -# The entire 'cairo' folder will be removed in a later FLTK release. -######################################################################## - -# Build dummy fltk_cairo library - -set(cairo_SRCS cairo_dummy.c) - -fl_add_library(fltk_cairo STATIC "${cairo_SRCS}") -target_link_libraries(fltk_cairo PUBLIC fltk::fltk) - -# Build shared dummy library(optional) - -if(FLTK_BUILD_SHARED_LIBS) - - fl_add_library(fltk_cairo SHARED "${cairo_SRCS}") - target_link_libraries(fltk_cairo-shared PUBLIC fltk::fltk-shared) - -endif(FLTK_BUILD_SHARED_LIBS) - -set(FLTK_LIBRARIES ${FLTK_LIBRARIES} PARENT_SCOPE) -set(FLTK_LIBRARIES_SHARED ${FLTK_LIBRARIES_SHARED} PARENT_SCOPE) diff --git a/cairo/cairo_dummy.c b/cairo/cairo_dummy.c deleted file mode 100644 index afa47504b..000000000 --- a/cairo/cairo_dummy.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - Dummy C file to build the dummy Cairo library for the FLTK project. - - Copyright 2023 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 -*/ - -/* - Note: since FLTK 1.4.0 Fl_Cairo_Window support is included in - libfltk and libfltk_cairo is no longer necessary. This directory is - used to build an "empty" dummy library for backwards compatibility, - just in case users expect it to exist. - - The entire 'cairo' folder will be removed in a later FLTK release. -*/ - -int fl_cairo_dummy() { - return 0; -} diff --git a/documentation/src/basics.dox b/documentation/src/basics.dox index 78e7858dd..2218dbb4b 100644 --- a/documentation/src/basics.dox +++ b/documentation/src/basics.dox @@ -341,11 +341,7 @@ The libraries are named `fltk.lib`, `fltk_forms.lib`, `fltk_gl.lib`, and \note The separate \p fltk_cairo library is no longer necessary since FLTK 1.4.0. - However, this release of FLTK builds a dummy `fltk_cairo` library for - backwards compatibility. You are advised to remove the usage of - the `fltk_cairo` library from your build systems and tools. - <b>The `fltk_cairo` library will be removed in a future release.</b> - + It is no longer built since FLTK 1.5.0. As before, the \p fltk-config script can be used to get the options that are required by your linker: @@ -370,7 +366,7 @@ c++ ... `fltk-config --use-forms --use-gl --use-images --ldflags` The option `--use-cairo` may be used to build your program with Cairo libs if you use Cairo in your code. It does no longer include the `fltk_cairo` lib but all necessary Cairo compiler flags and Cairo libs, if and only if FLTK has been -built with the optional Cairo support by configure or CMake. +configured with the optional Cairo support by CMake. Finally, you can use the \p fltk-config script to compile one or more source files as a FLTK program. diff --git a/examples/cairo-draw-x.cxx b/examples/cairo-draw-x.cxx index a265dc360..dd31e0bb0 100644 --- a/examples/cairo-draw-x.cxx +++ b/examples/cairo-draw-x.cxx @@ -58,8 +58,8 @@ int main(int argc, char **argv) { #include <FL/fl_ask.H> int main(int argc, char **argv) { fl_message_title("This program needs a Cairo enabled FLTK library"); - fl_message("Please configure FLTK with Cairo enabled (--enable-cairo or --enable-cairoext)\n" - "or one of the CMake options FLTK_OPTION_CAIRO_WINDOW or FLTK_OPTION_CAIRO_EXT, respectively."); + fl_message("Please configure FLTK with Cairo enabled by one of the CMake options\n" + "FLTK_OPTION_CAIRO_WINDOW or FLTK_OPTION_CAIRO_EXT, respectively."); return 0; } #endif // (FLTK_HAVE_CAIRO) diff --git a/fl_config.cmake.in b/fl_config.cmake.in index f5eea672c..c1a1b3c5e 100644 --- a/fl_config.cmake.in +++ b/fl_config.cmake.in @@ -30,7 +30,7 @@ /* * FLTK_HAVE_CAIRO * - * Do we have the Cairo library available? + * Do we have the Fl_Cairo_Window support? */ #cmakedefine FLTK_HAVE_CAIRO 1 @@ -71,7 +71,7 @@ * Do we use Cairo to draw to the display? * */ - + #cmakedefine FLTK_USE_CAIRO 1 |
