Commit Graph

33 Commits

Author SHA1 Message Date
Albrecht Schlosser
8b4af06a96 CMake: don't export unnecessary executable files
Exporting executable files means that they would appear in the CMake
config files as "imported targets". This could break the config files
of Linux and other distributions if such executables are not installed
when building FLTK programs.

The only executable files that need to be exported are the `fluid`
executables that may be used to convert .fl files during building.
2026-02-07 20:08:23 +01:00
Albrecht Schlosser
c17c2e3808 Clean up .gitignore files
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled
Since FLTK 1.5 building FLTK in the source tree is prohibited by our
CMake setup. Therefore all build artifacts are stored in the build
tree and don't need to be "ignored" in the source tree.
This simplifies the .gitignore files significantly.

There are some exceptions though, for instance .cxx and .h files
generated by fluid which might be created by a user/developer
executing fluid in the source tree.
2025-12-30 18:41:33 +01:00
Albrecht Schlosser
1066b69c8e Fix "fully support ... own shared libraries" (#1238)
- If shared libraries are built, then fluid, fltk-options, and the
  "games" are linked against the shared FLTK libraries. On some
  platforms the static and the shared versions of fluid and
  fltk-options are built. The games are only built if
  FLTK_BUILD_TEST is enabled.

- The CMake 'install' target now installs the games (if built)
  and their man pages on all platforms (no matter if that is
  useful, for instance on Windows).

- On macOS 'CMAKE_INSTALL_RPATH' is set so *installed* programs
  automatically find their shared FLTK libraries. The "shared"
  versions of fluid and fltk-options got their own '.plist' files.
  This works for both the executables themselves as well as those
  included in bundles. There may be more to do on the macOS platform.
2025-04-21 19:50:12 +02:00
Albrecht Schlosser
191b33e0de Update version numbers to 1.5.0 2025-03-06 18:16:03 +01:00
Albrecht Schlosser
e2ca1a39c8 Remove autotools (configure/make) support 2025-03-06 17:12:52 +01:00
Albrecht Schlosser
02af6a57eb Bump version numbers to 1.4.2
Some checks are pending
Build and Test / build-linux (push) Waiting to run
Build and Test / build-wayland (push) Waiting to run
Build and Test / build-macos (push) Waiting to run
Build and Test / build-windows (push) Waiting to run
2025-02-21 16:25:39 +01:00
Albrecht Schlosser
99a6286288 Bump version numbers for release 1.4.1
To do: update CHANGES.txt with real info.
2024-12-09 20:46:01 +01:00
Albrecht Schlosser
d3d051483a Improve output of 'fltk-options -h' and '-L*'
This commit includes minor code formatting w/o semantic changes
and fixes some typos.
2024-11-24 16:51:35 +01:00
Albrecht Schlosser
510cffdb59 Improve layout of fltk-options
- slightly enlarge some field and object sizes
- fix window size_range()
2024-10-30 14:18:17 +01:00
Albrecht Schlosser
d163ab1357 Make remaining 'XPM' images 'const' 2024-10-20 17:00:16 +02:00
Albrecht Schlosser
a6a0a65edf Update or remove version numbers, update copyright years
Note: one goal is to have to edit fewer version numbers in source
files for each release.

We may be able to generate some files by the build procedure (CMake)
to avoid editing them in the future (1.5.0 or later).
2024-10-15 20:42:26 +02:00
Albrecht Schlosser
ac8724502f Quote variables that may contain spaces in fltk-options/Makefile 2024-08-10 16:40:06 +02:00
ManoloFLTK
5ec7176e81 Fix for Fl_Native_File_Chooser::filter_value() - cont'd (#899) 2024-04-22 18:35:59 +02:00
ManoloFLTK
abfc8ee52f Fix: Fl_Native_File_Chooser::filter_value() [Kdialog] always returns 0 (#899)
- 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-22 16:34:08 +02:00
Albrecht Schlosser
af90841fbc Update dependencies, whitespace, and Fl_File_Chooser.cxx
Rewrite src/Fl_File_Chooser.cxx from its .fl source file
2024-03-19 15:39:18 +01:00
Matthias Melcher
c9f54ad744 fltk-options: enlarge text area for Linux fonts 2024-03-02 19:41:51 +01:00
ManoloFLTK
b74099c5fd Add OPTION_SIMPLE_ZOOM_SHORTCUT to fine tune zoom-in shortcut 2024-03-02 17:25:10 +01:00
Albrecht Schlosser
7992b0b9ab CMake: fix installation on macOS
fluid and fltk-options are now installed correctly as bundles and as
stand-alone executables side by side in the 'bin' folder relative
to CMAKE_INSTALL_PREFIX.

This works but the installation folders may be changed in the future.

Targets fltk::fluid is now exported correctly so

  find_package(FLTK CONFIG ...)

works with both the build folder and an installed version.
2024-02-14 17:06:10 +01:00
Albrecht Schlosser
f4af40fe55 Modern CMake: export shared libraries and fltk-options 2024-02-10 14:19:09 +01:00
Albrecht Schlosser
fd5cd80935 Introduce "Modern CMake" in FLTK
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-02-07 18:37:34 +01:00
Albrecht Schlosser
b4697c33ff Remove Fl_Simple_Terminal (replaced by Fl_Terminal)
... as discussed previously.
2024-01-06 18:29:25 +01:00
Albrecht Schlosser
5df5daf78e Make the 'Forms' compatibility library 'fltk_forms' optional
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-20 17:33:37 +01:00
Matthias Melcher
04a5098a58 #840: Generously adds Fl::args_to_utf8() for MinGW support. 2023-12-15 13:04:57 +01:00
Matthias Melcher
34ed30fe1a Adds linespacing() to Fl_Browser_ and all derived widgets 2023-11-25 18:20:08 +01:00
Albrecht Schlosser
6f021d4830 CMake: Raise cmake_minimum_required from 3.12 to 3.15
Remove code that checks CMake versions lower than 3.15
2023-11-15 21:30:12 +01:00
Albrecht Schlosser
4769e0085d Fix more compiler warnings (comma at end of enum)
These warnings are benign but ... I fixed them nevertheless.
2023-04-13 22:55:18 +02:00
Albrecht Schlosser
5175192755 CMake: build shared libs with OPTION_CAIROEXT (issue #250)
- remove separate libfltk_cairo to avoid cyclic dependencies, but
- keep a dummy libfltk_cairo in 1.4.0 for backwards compatibility
- move cairo/Fl_Cairo.cxx to src/Fl_Cairo.cxx
- add preliminary Cairo support for Visual Studio (MSVC)

Static linking is not affected by this change, but users building
with hand-made Makefiles will have to remove libfltk_cairo starting
with FLTK 1.4.0. The dummy library can be linked for backwards
compatibility but it will be removed later (in 1.4.x or 1.5.0).

The shared FLTK library libfltk.{so|dylib|dll|..} depends on libcairo
if and only if FLTK is built with one of the Cairo options. This has
always been the case for OPTION_CAIROEXT but is now also true if only
OPTION_CAIRO is selected, i.e. FLTK programs linked with a Cairo
enabled shared FLTK library will also be linked with libcairo. The same
is true for configure options --enable-cairo and --enable-cairoext,
respectively.

Preliminary Cairo support for MSVC now detects a Cairo installation
using the CMake variable FLTK_CAIRO_DIR which must be set by the user.
Note that this feature is temporary and may be changed in the future
for a better and more comfortable version.
2023-03-09 17:34:05 +01:00
Albrecht Schlosser
f04f8fb1a2 Give fluid and fltk-options their own .gitignore files
Move git exclusions from the main .gitignore file to the respective
directories to simplify the main file.

Note to devs: some file types are ignored "everywhere" (e.g. *.exe),
there's no need to add these files to the subdirs.
2023-02-05 19:41:19 +01:00
Matthias Melcher
1aa6c4fed8 Fix position() methods that shadow Fl_Widget::position()
* `FL_DEPRECATED` macro to mark `position()` method that shadow `Fl_Widget::position()` #69 (#666)
2023-02-02 20:54:19 +01:00
Albrecht Schlosser
4e75549e7b Update dependencies and fix whitespace errors
- replace tabs with spaces
- remove trailing whitespace
2023-02-02 17:09:14 +01:00
Matthias Melcher
e9e7be3ca1 Fixes fltk-options setting wrong keys 2023-01-27 13:04:33 +01:00
Matthias Melcher
3a7c9fe978 STR 2639 Fixes Fl_Pack resize behaviour
FLUID cleanups
FLUID Fl_Pack support improvement
FLUID fix error in handling live mode resizables
2023-01-23 16:08:59 +01:00
Matthias Melcher
1fc269b0d4 Move global FLTK options into new app fltk-admin (#560) 2023-01-21 17:14:41 +01:00