summaryrefslogtreecommitdiff
path: root/CMake/options.cmake
AgeCommit message (Collapse)Author
4 dayswip: forkmaxim nikonov
11 daysCMake: add try_compile() to figure out if Pen/Tablet is supportedAlbrecht Schlosser
This test is specifically intended to disable Pen/Tablet support on classic MinGW (32-bit) platforms that lack required symbol definitions although Pen/Tablet support might be supported by the Windows system. This test can be extended for other platforms, but for now it's performed only on Windows.
2026-01-08Add CMake option FLTK_OPTION_PEN_SUPPORT (default: ON)Albrecht Schlosser
This option can be used to disable pen/tablet support if there are build problems on a particular platform or build system (e.g. MinGW) so users can continue to build FLTK 1.5. Users can also choose to disable pen support if they don't need it.
2026-01-05Wayland: use modern approach to cursor shapes with the "Cursor shape" protocol.ManoloFLTK
This removes the need to guess names of files each theme gives to cursor shapes and makes linking with dbus superfluous when the compositor supports the new protocol. The old, surface-based approach to cursor shapes remains used for custom shapes.
2026-01-04Add an option and the first program to create screenshotsAlbrecht Schlosser
This is the first step in creating additional programs for saving screenshots for documentation purposes. These screenshots must be saved in the documentation/images directory and checked into the Git repository. These programs allow developers to create new screenshots or change existing ones. More screenshots may be created by programs in the /test/ folder. To-do: add more *new* screenshot programs, and if useful, move some existing programs from the `/test/` folder to `/screenshots/`, such as `test/resize-example*.cxx` and maybe more.
2025-12-08Wayland: add support of the "XDG dialog windows" protocolManoloFLTK
2025-11-02Fix "CMake: Fallback to libOpenGL (no-X11 OpenGL)" (#1251)ManoloFLTK
2025-06-03Add build option FLTK_USE_DBUS to allow build w/o dbus (PR #1252)ManoloFLTK
Thanks to @lanodan for most of the source code.
2025-05-28Fix usage of FLTK_BACKEND_WAYLAND and FLTK_USE_WAYLANDAlbrecht Schlosser
- Do not change or remove the cache variable FLTK_BACKEND_WAYLAND: this is an option set (and must only be changed) by the user. - CMake/options.cmake: check Wayland availability if option FLTK_BACKEND_WAYLAND is ON and set the result variable FLTK_USE_WAYLAND accordingly. - Replace FLTK_BACKEND_WAYLAND with FLTK_USE_WAYLAND everywhere else, except as noted above: in options.cmake.
2025-05-06Remove hardcoded version numbers: part 1Albrecht Schlosser
The goal is to change the version number for a new release only in CMakeLists.txt. This is the first step. Details: - CMake/gen_config.cmake: this new file is included to generate the header files config.h (private, root directory), and FL/fl_config.h (public, can be installed). This file implements also ABI version checks (removed from FL/Enumerations.H and with more checks). Warnings are issued if the chosen ABI version is invalid. - CMake/export.cmake: code to generate 'config.h' was moved to CMake/gen_config.cmake. - CMake/options.cmake: set default of FLTK_BUILD_FORMS=OFF + comments - CMakeLists.txt: move generation of FL/fl_config.h to gen_config.cmake, add API and ABI versions to CMake summary, - FL/Enumerations.H: remove most of the version number details which are now included in FL/fl_config.h. This needed also some doxygen related changes. - README.CMake.txt: improve docs of FL_ABI_VERSION and some more. Reflect the new default of CMake option FLTK_BUILD_FORMS (OFF). - documentation/Doxyfile.in: add FL/fl_config.h to file list. This file is created in the build tree (and may be "installed"). - fl_config.h.in: add version number details that have been moved here from Enumerations.H (used to generate FL/fl_config.h).
2025-04-01options.cmake: Check Threads_FOUND, not CMAKE_HAVE_THREADS_LIBRARYAaron M. Ucko
The former's been available since CMake v2.8 and documented since v3.17; the latter was never documented and quietly went away in CMake v3.24.
2025-03-19Remove obsolete build option 'FLTK_OPTION_STD'Albrecht Schlosser
This option is no longer needed since FLTK 1.5 always requires C++11.
2025-03-18Fix "X11 library missing in fltk-config" (#1228)ManoloFLTK
2025-03-16Remove libfltk_cairo (fltk::cairo)Albrecht Schlosser
This library is no longer needed and was "empty" for backwards compatibility since FLTK 1.4.0.
2025-03-08CMake: set FLTK_OPTION_STD effectively "always on"Albrecht Schlosser
Temporarily done by setting the internal variable FLTK_USE_STD to 1. This affects FL/fl_config.h where FLTK_USE_STD will always be 1. Source code that checks this variable should be fixed soon.
2025-03-07Fix "fltk autotools build does not link against libXft" (#1202)ManoloFLTK
libXft was erroneously present in the link command when using Pango and Cairo. This is fixed by disconnecting the GUI scaling code from use of Xft. This commit also makes sure that when Wayland is used, pkg-config is available on the build machine. This allows to remove from file CMake/options.cmake code that was labelled with "FIXME".
2025-02-21Bump version numbers to 1.4.2Albrecht Schlosser
2024-12-09No need to link to libgtk when using package libdecor-0-devManoloFLTK
2024-10-09CMake: ignore FLTK_MSVC_RUNTIME_DLL on other platformsAlbrecht Schlosser
This commit suppresses a CMake warning if FLTK_MSVC_RUNTIME_DLL is defined on the CMake commandline on platforms that don't use it.
2024-09-03CMake/Windows: enable MSVC runtime DLL option for Clang (#1058)Albrecht Schlosser
User @supsm reported that using LLVM/clang to compile together with the MSVC linker should support the MSVC runtime DLL selection. This commit enables the option on Windows except MinGW and MSYS rather than MSVC only.
2024-08-31 CMake: replace check_function_exists() with check_symbol_exists() (#1053)ManoloFLTK
2024-08-08CMake: fix usage of OPENGL_GLU_INCLUDE_DIR (#1001)Albrecht Schlosser
This commit consists of two parts: 1. CMake/resources.cmake: remove the old variable OPENGL_GLU_INCLUDE_DIR from the CMake cache if possible, otherwise enforce a clean build. 2. src/CMakeLists.txt, CMake/options.cmake: use the new variable name FLTK_OPENGL_GLU_INCLUDE_DIR. For details please see GitHub Issue #1001.
2024-05-13CMake: improve finding cairo.dll on WindowsAlbrecht Schlosser
- don't use pkg-config to find Cairo if FLTK_CAIRO_DIR is set - use FLTK_CAIRO_DIR to locate Cairo headers and DLL if it is set - otherwise try to find Cairo with pkg-config anyway This prevents accidentally "finding" the system Cairo libs provided by MSYS - which would tie the FLTK library and user programs to MSYS, i.e. it would make FLTK programs depend on the MSYS installation.
2024-04-22 Fix: Fl_Native_File_Chooser::filter_value() [Kdialog] always returns 0 (#899)ManoloFLTK
- remove build option FLTK_USE_KDIALOG replaced by an Fl::option() option - new run-time option OPTION_FNFC_USES_KDIALOG - make options OPTION_FNFC_USES_KDIALOG and OPTION_FNFC_USES_ZENITY false by default - add mention of new program fltk-options in the doc of Fl::option() - change logic of choice of the native file chooser under X11/Wayland: the zenity and kdialog choosers are opt-in; otherwise the GTK file chooser is used, unless opted out with OPTION_FNFC_USES_GTK - document that zenity may be interesting for sandboxed apps - document that both zenity and kdialog make member functions Fl_Native_File_Chooser::filter_value() inoperable
2024-04-18Restore IMPORTED_TARGET in pkg_check_modules command for libdecorManoloFLTK
2024-04-18Allow libdecor package version ≥ 0.2.0 with FLTK_USE_SYSTEM_LIBDECORManoloFLTK
2024-04-17Separate FLUID user documentation, screen shot automation (#936)Matthias Melcher
* CMake integration, no autotiools * alignment panel is now correctly renamed to setting panel * source view is now correctly renamed to code view * Merge FLTK FLUID docs into FLUID user manual. * Add two simple entry tutorials * Remove FLUID chapter form FLTK docs. * GitHub action to generate HTML and PDF docs and make the available as artefacts
2024-04-14Fix and improve generation of fltk-config (#954 and more)Albrecht Schlosser
Parts of this commit fix the usage of CMake targets in the generation process of fltk-config modified by PR #954. The rest improves handling of variables used to generate fltk-config, removes obsolete comments, documents variables like GLLIBS etc. which had to be done anyway.
2024-04-14CMake: Use imported targets for PkgConfig packages (#954)Jordan Williams
This carries include directories and the required link flags. Several libraries brought in through pkg_check_modules aren't linked correctly using the _LDFLAGS variables. Instead, they link the libraries directly with `-l`. This is problematic because it doesn't properly pull in the actual directory of the library being linked when it is not in a system library directory. Likewise, the necessary include directories for several of these targets aren't properly set either. Linking against the imported targets automatically pulls in the necessary include directories.
2024-04-12CMake: Improve detection of the GLU library and GL/glu.h header file (#953)Jordan Williams
* CMake: Improve detection of the GLU library and GL/glu.h header file Locate the GLU library and header independent of the GL library and header locations. Add the GLU header location to necessary target_include_directory calls. * CMake: Locate and use the GL include directory Find the GL include directory and use it in target_include_directories calls.
2024-03-18CMake: formatting onlyAlbrecht Schlosser
2024-03-15Have FLTK use libdecor at version > 0.2.2ManoloFLTK
- it's no longer necessary to take care of the change in the layout of "struct libdecor" between versions ≤ 0.2.2 and > 0.2.2 of libdecor - version > 0.2.2 contains MR131, that is, it defines LIBDECOR_WINDOW_STATE_RESIZING so the hack to emulate it is no longer necessary - CMake option FLTK_USE_SYSTEM_LIBDECOR now requires libdecor version > 0.2.2 to be activated, otherwise the bundled libdecor is used - what will be the libdecor version after 0.2.2 (0.2.3? 0.3.0?) is not known as of today
2024-03-13To support difference in struct libdecor between built-in and systemManoloFLTK
That should disappear when next version of libdecor will be released.
2024-03-13Remove useless X11 libraries when building with -DFLTK_BACKEND_X11=0ManoloFLTK
2024-03-13Allow CMake-based build with -DFLTK_BACKEND_X11=0 under Linux/UnixManoloFLTK
2024-02-24CMake/macOS/X11: fix "FINK" search directoriesAlbrecht Schlosser
note: use only if found. Todo: check if we can get rid of explicit directory names like /opt/sw, /sw, /opt/X11, ...
2024-02-22Fix CMake code that should only be evaluated on macOSAlbrecht Schlosser
Too much simplified code when introducing modern CMake and renaming some build options caused this issue. It's hopefully fixed nor, or at least improved. Todo: the code in question needs to be revised anyway.
2024-02-14CMake: fix "LIBDECOR_PLUGIN_DIR" undefined errorAlbrecht Schlosser
This could happen on Linux if built with CMake option "-DFLTK_USE_SYSTEM_LIBDECOR=OFF"
2024-02-13CMake: improve formatting, remove debug statementsAlbrecht Schlosser
2024-02-10CMake: fix some weird internal dependencies (Wayland/X11)Albrecht Schlosser
Improve recognition of Wayland and X11 specific build options and remove duplicates from required dependencies (FLTK_LDLIBS) used in fltk-config. This should also fix the GitLab CI build process. To do: the logic to find the dependencies of Wayland and X11 is currently suboptimal. This will be improved in a later commit.
2024-02-08CMake cleanup: fix alignmentAlbrecht Schlosser
2024-02-08CMake cleanup: mark two more cache variables "advanced"Albrecht Schlosser
2024-02-07Introduce "Modern CMake" in FLTKAlbrecht Schlosser
This is a big commit and there are too many changes to list them all. The main changes are: - rename all CMake build options to 'FLTK_*' - export library targets with namespace (prefix) 'fltk::' - standardize shared library target names with suffix '-shared' - set public build properties on libraries for consumers - document library names and aliases in README.CMake.txt - document changes in "Migrating Code from FLTK 1.3 to 1.4" - partial backwards compatibility for old user projects Included but not directly related changes: - fix Windows (Visual Studio) DLL build - add CMake function fl_debug_target() to show target properties - don't build test programs if FLTK is a subproject - internal: reformat CMake code: remove space before '(' Thanks to Matthias and Manolo for their help, testing, and feeback.
2023-12-20Make the 'Forms' compatibility library 'fltk_forms' optionalAlbrecht Schlosser
This library is no longer needed in FLTK itself. There is only one demo program (test/forms.cxx) that uses it if it is built. The demo program displays a message if fltk_forms is not available. The default is 'enabled' for backwards compatibility but this may be changed to 'disabled' in a future version.
2023-12-05Wayland+CMake: use set_source_files_properties() for libdecorManoloFLTK
2023-12-04Minor updates of bundled libraries and README.CMake.txtAlbrecht Schlosser
Update Makefiles, CMakeLists.txt, improve formatting.
2023-12-02Wayland: make OPTION_USE_SYSTEM_LIBDECOR ON by defaultManoloFLTK
This commit makes the default FLTK build setting use libdecor as packaged in Linux when the build system contains packages libdecor-0-dev and libdecor-0-plugin-1-gtk in version ≥ 0.2.0. Otherwise, FLTK uses the bundled version of libdecor. This includes situations where package libdecor-0-dev is present in an earlier version.
2023-11-25CMake/Windows/MSVC: Add option to select MSVC RuntimeAlbrecht Schlosser
Selects MSVC compiler/build options known as /MT, /MTd, /MD, or /MDd. This applies to "Visual Studio" (IDE) and "NMake Makefiles" builds.
2023-11-15CMake: Raise cmake_minimum_required from 3.12 to 3.15Albrecht Schlosser
Remove code that checks CMake versions lower than 3.15
2023-10-22Make Fl_String and Fl_Int_Vector private (#789)Albrecht Schlosser
- add CMake option 'OPTION_USE_STD' - add configure option '--enable-use_std' - move FL/Fl_String.H to src/Fl_String.H - move FL/Fl_Int_Vector.H to src/Fl_Int_Vector.H - remove Fl_String from demo program examples/callbacks.cxx - remove Fl_Int_Vector from public header FL/Fl_Table.H - some methods of Fl_Table are no longer inline - add CMake option OPTION_USE_STD to allow std::string in some selected functions and methods Experimental, may be removed before release: - use either Fl_Int_Vector or std::vector in Fl_Table depending on CMake OPTION_USE_STD or configure --enable-use_std Move all fl_filename* functions that use Fl_String to fluid Main changes in fluid: - add fluid_filename.h and .cxx - include "fluid_filename.h" rather than <FL/filename.H> Update fl_input(), fl_password() and test/ask - add maxchar parameter to fl_input() and fl_password() - fl_input_str() and fl_password_str() are optional and return std::string if enabled (FLTK_USE_STD)