summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
AgeCommit message (Collapse)Author
3 dayswip: forkmaxim nikonov
10 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.
2025-12-21Win32: Basic Pen driver setupMatthiasWM
2025-12-08Wayland: add support of the "XDG dialog windows" protocolManoloFLTK
2025-11-27Refactor pen interface into driver system.Matthias Melcher
2025-11-17Fix two macOS compiler warnings.Matthias Melcher
2025-11-17Add pen/stylus/tablet API and driver for macOS (#1326)Matthias Melcher
* define the pen/tablet support API * add pen event handler stub as a fallback * add pen device test "penpal". * Add macOS pen/stylus/tablet driver. * Add Oxygen documentation.
2025-11-16Refactor large static class Fl into an expandable namespace Fl (#1325)Matthias Melcher
* Change class Fl into namespace Fl. * Untangle Fl namespace into themed headers. * cut line count of FL/Fl.H in half * FL/core subdirectory now holds short headers grouped by functionality.
2025-08-12Restore building for OpenBSDManoloFLTK
2025-07-03Remove private class Fl_Int_VectorAlbrecht Schlosser
This class was used in pre-C++11 versions (up to 1.4.x) and is no longer needed.
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-11Remove obsolete class Fl_StringAlbrecht Schlosser
Note: it's still in branch-1.4 and in git history for reference
2025-03-07Remove platform-specific code from file cp936ext.hManoloFLTK
2025-01-27CMake: fix include directories of bundled image libsAlbrecht Schlosser
If FLTK has been built with bundled image libs the include directory of the *installed* library headers is 'FL/images' relative to the normal 'include' directory. The CMake property "include_directories" is now added to the installed fltk_images library so it is used when building user programs with bundled image libs.
2025-01-21CMake: check INTERFACE_LINK_LIBRARIES for empty valueAlbrecht Schlosser
This is a safety for consistency. It doesn't really change the result but avoids "adding" an empty argument to a CMake list.
2025-01-20CMake: make "optional" dependencies 'PUBLIC' (#1173)Albrecht Schlosser
On FreeBSD some of the required header files (and libraries) are not in standard (known) locations, hence they wouldn't be found under certain circumstances. Making all dependencies 'PUBLIC' adds the needed include directories and link libraries to all builds. For details see GitHub Issue #1173 with title "FLUID compilation error on FreeBSD when FLTK_BACKEND_X11=ON"
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-06-01libdecor: update to upstream commit c2bd8ad6 (31-may-2024)ManoloFLTK
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-21Fix build of test programs using shared FLTK libsAlbrecht Schlosser
2024-04-21CMake: add target_include_directories() for optional libs (#954)Albrecht Schlosser
This ensures that header files for libraries found by `pkg-config` (pkg_check_modules) in non-system directories will be found by the compiler during the compilation of the FLTK library. This issue has been reported in PR #954 related to builds with Conan where some header files are not in system locations.
2024-04-20Add "fl_" prefix to libdecor symbols when using the built-in copy of libdecorManoloFLTK
This allows client apps to use other versions of libdecor if they wish, just like what FLTK already does with libpng and libjpeg.
2024-04-20CMake/MSVC: Fix shared library build, add to GitHub CI buildAlbrecht Schlosser
Fault was a simple typo or copy-paste error
2024-04-19CMake: fix propagation of CMake targets to user projects (#954)Albrecht Schlosser
Unfortunately commit 5417ea5f1f33f62e2511bda74477da05dce900a3 broke simple user projects by propagating unknown CMake target names to linker requirements of user projects. This commit tries to fix this w/o breaking the intentions of PR #954.
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-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-21CMake: Remove "-no-pie" build optionAlbrecht Schlosser
libdecor/build/Makefile: unused anyway (previously used building demos) src/CMakeLists.txt: broke some user builds, see fltk.general, thread "-no-pie in FLTK Libraries build." (Mar 17, 2024). Todo: check usage of "-fPIC" (libdecor builds)
2024-03-18Move nanosvg to a separate file, don't use 'roundf()' (#937)Albrecht Schlosser
Replacement of roundf() with nsvg__roundf() fixes one aspect of issue #937. Having the nanosvg implementation in its own module was planned anyway.
2024-03-18Restore building on old Linux/Unix systems lacking Xutf8LookupString()ManoloFLTK
2024-03-13Remove useless X11 libraries when building with -DFLTK_BACKEND_X11=0ManoloFLTK
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.
2024-01-06Remove Fl_Simple_Terminal (replaced by Fl_Terminal)Albrecht Schlosser
... as discussed previously.
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: much lighter but partial implementation of the "GTK Shell" protocolManoloFLTK
Only the middle-button click gesture is implemented which avoids interference with what libdecor does with right-click and double-click.
2023-12-05Wayland+CMake: use set_source_files_properties() for libdecor - cont'dManoloFLTK
2023-12-05Wayland+CMake: use set_source_files_properties() for libdecorManoloFLTK
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-30Wayland: use GTK Shell also with system libdecorManoloFLTK
2023-11-29Add commandline conversion for Windows (no-op on other platforms)Albrecht Schlosser
- add Fl::args_to_utf8() to convert commandline arguments to UTF-8 This new function closes the gap that previously only Visual Studio applications converted their commandlines to UTF-8. Tested with MinGW, MSYS2/MinGW-w64, and Visual Studio (2019).
2023-11-19Windows/MSVC: Fix wide char commandline handling (#840)Albrecht Schlosser
Windows programs (subsystem:windows, not Windows console programs) compiled with Visual Studio need a WinMain entry point. The commandline arguments handled by this function are now properly converted to UTF-8 before the standard main() entry point is called. This applies only to Visual Studio! Note that some build systems like MinGW and/or MSYS2 may still have issues with some Unicode (non-ASCII) commandline arguments.
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-11-14Fl_Terminal widget (#800)erco77
Pull Fl_Terminal widget from Greg's fork
2023-11-12Have libdecor-gtk implement the "GTK Shell" protocolManoloFLTK
2023-10-16Add Fl_Grid widget and test and demo programsAlbrecht Schlosser
- FL/Fl_Grid.H: header file - src/Fl_Grid.cxx: implementation - examples/grid-simple.cxx: simple example program - test/cube.cxx: use Fl_Grid for layout - test/grid_alignment.cxx: test cell alignment and other functions - test/grid_buttons.cxx: demo program as discussed in fltk.general - test/grid_login.cxx: like test/flex_login.cxx but with Fl_Grid - test/flex_login.cxx: modified to match test/grid_login.cxx