Commit Graph

63 Commits

Author SHA1 Message Date
Albrecht Schlosser
3c4f21783c Improve README.CMake.txt
- fix typos, clarify text
- improve headlines
- add "generic" CMake instructions
- add version spec to find_package command
2024-10-29 20:10:53 +01:00
Albrecht Schlosser
81d3ccefa4 CMake: ignore FLTK_MSVC_RUNTIME_DLL on other platforms
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-10-09 16:04:38 +02:00
ManoloFLTK
a333817f41 Mark CMake option FLTK_USE_PANGO as highly recommended under X11 2024-09-23 19:41:44 +02:00
Albrecht Schlosser
666bbda70e Fix tabs, trailing spaces, and update dependencies 2024-08-10 20:32:19 +02:00
Matthias Melcher
e7b8a24685 Add chapter in CMake docs for building FLTK under Windows WSL. 2024-07-29 13:05:31 +02:00
Greg Ercolano
f44c163234 Add example to build w/warnings+fltk examples 2024-06-24 21:14:51 -07:00
Albrecht Schlosser
d9c8cebfbe Remove trailing whitespace
no code changes
2024-06-21 18:10:33 +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
ManoloFLTK
e6957fc2f5 Allow libdecor package version ≥ 0.2.0 with FLTK_USE_SYSTEM_LIBDECOR 2024-04-18 19:32:47 +02:00
Matthias Melcher
fd791a068e
Separate FLUID user documentation, screen shot automation (#936)
* 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-17 17:51:32 +02:00
ManoloFLTK
82bd0b6652 Have FLTK use libdecor at version > 0.2.2
- 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-15 12:21:38 +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
Greg Ercolano
1c9063b8bc Updated nmake build command in README 2023-12-08 18:53:23 -08:00
Albrecht Schlosser
cf07fa09dc Minor updates of bundled libraries and README.CMake.txt
Update Makefiles, CMakeLists.txt, improve formatting.
2023-12-04 17:31:18 +01:00
Albrecht Schlosser
63c54fe7c8 CMake: Remove UseFLTK.cmake generation and usage 2023-12-03 17:16:58 +01:00
ManoloFLTK
f72748bb45 Wayland: make OPTION_USE_SYSTEM_LIBDECOR ON by default
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-12-02 09:28:08 +01:00
Albrecht Schlosser
4a461efae6 CMake/Windows/MSVC: Add option to select MSVC Runtime
Selects MSVC compiler/build options known as /MT, /MTd, /MD, or /MDd.

This applies to "Visual Studio" (IDE) and "NMake Makefiles" builds.
2023-11-25 21:03:23 +01:00
Albrecht Schlosser
b89645ea18 Remove unnecessary statement from CMake build example 2023-10-31 18:52:42 +01:00
Albrecht Schlosser
c47fd75bcd Fix typos 2023-10-31 18:22:42 +01:00
Albrecht Schlosser
eb759cb118 Improve build instructions in README.CMake.txt (#164)
- update CMakeLists.txt files for user projects,
- add one that uses CMake's FetchContent module.
2023-10-31 16:04:31 +01:00
Albrecht Schlosser
1209e9dcd7 Make Fl_String and Fl_Int_Vector private (#789)
- 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)
2023-10-22 19:35:17 +02:00
Albrecht Schlosser
cfa1a3bd40 Enhance info about documentation generation
- update build requirements
- clarify CMake options
- make clear that a POSIX shell and some Unix tools are required
  to build the PDF documentation
2023-10-03 09:19:36 +02:00
ManoloFLTK
3a777eed58 Describe cmake option OPTION_ALLOW_GTK_PLUGIN 2023-07-09 08:29:58 +02:00
ManoloFLTK
89874f4f85 Move OPTION_USE_SYSTEM_LIBDECOR away from doc options 2023-02-17 07:14:44 +01:00
ManoloFLTK
7a4d8a254e Describe OPTION_USE_KDIALOG and OPTION_USE_SYSTEM_LIBDECOR 2023-02-17 07:09:54 +01:00
Matthias Melcher
1fc269b0d4
Move global FLTK options into new app fltk-admin (#560) 2023-01-21 17:14:41 +01:00
ManoloFLTK
0ba051994a Have OPTION_USE_WAYLAND / --enable-wayland set to ON by default 2022-11-23 06:17:31 +01:00
Matthias Melcher
edf7510dda
Make building Fluid optional. (#539) 2022-11-13 20:16:54 +01:00
Greg Ercolano
f40bd49a7c Added cmake example for building nmake files
The docs needed an example of building fltk purely from the command line
with Visual Studio (e.g. with nmake), without the IDE.
2022-10-18 23:23:58 -07:00
ManoloFLTK
203e7b7098 New OPTION_WAYLAND_ONLY for CMake to build pure Wayland platform. 2022-09-09 15:19:15 +02:00
ManoloFLTK
c720aae515 Make hybrid Wayland/X11 platform. 2022-08-29 12:15:32 +02:00
ManoloFLTK
d096ec48d0 Documentation: add missing mentions of the Wayland platform. 2022-07-05 10:13:31 +02:00
ManoloFLTK
84cf249482 Fix for issue #253: Remove xdbe support 2021-11-26 15:01:54 +01:00
Albrecht Schlosser
4ba92a99bb Document how to build universal apps for macOS 2021-04-29 18:32:19 +02:00
Albrecht Schlosser
e182c8bcd5 Fix whitespace errors (no code changes)
- remove trailing whitespace
- convert tabs to spaces (configure.ac)
2021-02-16 14:21:13 +01:00
Albrecht Schlosser
bbaec9bd88 Update CMake and make files, minor edits only
There are no functional changes to be expected, mostly formatting
and comments.
2021-02-15 19:45:20 +01:00
ManoloFLTK
bb099ade19 Basic CMakeLists.txt file to build FLTK-based user program - continued
A single add_executable() command is possible.
2020-11-24 10:05:36 +01:00
ManoloFLTK
c7274294ae Basic CMakeLists.txt file to build FLTK-based user program.
The change is mostly concerned with showing how to build
a macOS bundled app, in addition to X11 and Windows support.
2020-11-23 17:22:58 +01:00
Greg Ercolano
7d126461ef Update cmake version requirement in README 2020-11-01 13:03:33 -08:00
Albrecht Schlosser
3b9a04ae2e CMake: add examples folder to build (optional)
- replace misnamed option 'OPTION_BUILD_EXAMPLES' with 'FLTK_BUILD_TEST'
- add option 'FLTK_BUILD_EXAMPLES' to build apps in examples folder
- move examples/fltk-versions.cxx to test/fltk-versions.cxx
- [Travis-CI] enable option 'FLTK_BUILD_EXAMPLES' for automatic builds
2020-08-21 18:55:12 +02:00
Albrecht Schlosser
720b84ef9d CMake: refactor and reformat CMake files
- raise minimum CMake version from 2.6.3 to 3.2.3 (Jun 01, 2015)
- indent all CMake files according to the CMP (2 col.)
- refactor FLTK version number definitions and usage
- unify CMake and autoconf/configure variable names:
  - FL_VERSION -> FLTK_VERSION
  - FL_MAJOR_VERSION -> FLTK_VERSION_MAJOR
  - etc. for _MINOR_ and _PATCH_, respectively
  - note: this does not affect FL_VERSION etc. in source code
- generate "export headers" for all libraries (experimental: OFF)
- port some forgotten goodies from branch-1.3 to master
- merge and improve macro 'create_example' (WIP)
- remove "temporary" options and code for older CMake versions
- include and use 'GenerateExportHeader' (experimental, WIP: OFF)
  - note: created header files are not yet used
- build only *one* DLL with Visual Studio (tested, works)
  - similar to the bundled IDE projects in 1.3.x
- add some dynamically linked test/demo programs ('*-shared')
  if shared libraries are built (WIP)
- split 'macros.cmake': use one file per macro
2020-07-15 00:34:53 +02:00
Albrecht Schlosser
f09e17c3c5 Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files
- update .fl files and generated files accordingly
- replace 'http://www.fltk.org' URL's with 'https://...'
- replace bug report URL 'str.php' with 'bugs.php'
- remove trailing whitespace
- fix other whitespace errors flagged by Git
- add and/or fix missing or wrong standard headers
- convert tabs to spaces in all source files

The only relevant code changes are in the fluid/ folder where
some .fl files and other source files were used to generate
the '$Id' headers and footers.
2020-07-06 20:28:20 +02:00
Albrecht Schlosser
6279ab0586 CMake: Deprecate FLTK_USE_FILE (UseFLTK.cmake)
Cherry-pick the essential changes from FLTK 1.3 since this change
had not been ported to 1.4 yet.

To do: my current plan is to consolidate 1.3 and 1.4 CMake files
as far as possible (with the exceptions of source files, obviously)
and to redesign / refactor CMake files later in this process or
maybe only for 1.4 if it turns out to be too much to backport.
2020-06-13 13:51:35 +02:00
Albrecht Schlosser
088eedb0ad Update CMake instructions for cross compilation
Add CMAKE_RC_COMPILER variable, switch to 64-bit toolchain, add
a note to replace the toolchain location as required, fix typos.
2020-01-18 14:29:01 +01:00
Albrecht Schlosser
a46060495d Update CMake README file for cross compilation
Add linker flags to create "native" Windows executables.
2019-07-03 13:41:42 +02:00
Albrecht Schlosser
de199c327e Add a CMake option to generate driver (developer) documentation.
Generating driver documentation can now be configured with CMake. The new
configuration OPTION_INCLUDE_DRIVER_DOCUMENTATION is "marked as advanced"
since only advanced users and/or FLTK developers need this.

Previously this could only be achieved by editing documentation/Doxyfile.in.

Added missing documentation option descriptions as well.
2018-12-29 20:35:10 +01:00
Greg Ercolano
16f968b40f Added the new OPTION_USE_NANOSVG to the README.CMake.txt file.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12422 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 00:02:33 +00:00
Greg Ercolano
a4433ca19d Emphasize in the docs that ".." at the end of cmake commands is
not an elipsis, but is part of the command.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12421 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-05 22:37:07 +00:00
Albrecht Schlosser
27d7736475 Fix some typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12301 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 18:28:10 +00:00
Albrecht Schlosser
e562ec02a6 Update several README files, remove obsolete information.
To be continued ...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12292 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-05 17:15:16 +00:00