summaryrefslogtreecommitdiff
path: root/CMake/options.cmake
AgeCommit message (Collapse)Author
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)
2023-04-30Allow building Wayland platform without dbus - cont'd (#726)ManoloFLTK
CMake-based building without dbus is made possible
2023-04-02Fix "recipe for target '../../src/xdg-decoration-protocol.c' failed" (#704)ManoloFLTK
2023-03-09CMake: build shared libs with OPTION_CAIROEXT (issue #250)Albrecht Schlosser
- 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-01-21Move global FLTK options into new app fltk-admin (#560)Matthias Melcher
2023-01-01Make sure that zlib and png are both local or system (#621)Matthias Melcher
Autoconf syncs png and zlib configuration Cmake png zlib selection
2022-12-16Derive Fl_Zenity_Native_File_Chooser_Driver from Fl_Kdialog_Native_…ManoloFLTK
Also add Fl::option(OPTION_FNFC_USES_ZENITY)
2022-12-16Add Zenity-based file chooser based on the KDialog one (HugLifeTiZ)Trent McPheron
If available, it is used on Linux regardless of the current desktop because it offers free XDG portal integration, which means it picks the correct file chooser on all desktops, and allows for meaningful file selection in sandbox environments like Flatpak.
2022-12-13 Fix for "Build on FreeBSD fails: linux/input.h not found" (#584)ManoloFLTK
2022-11-24CMake build for Wayland: check for presence of required GL-related softwareManoloFLTK
2022-11-24CMake building: improve messages about necessary software packagesManoloFLTK
2022-11-23CMake build for Wayland/X11 hybrid: check for libx???-dev packagesManoloFLTK
2022-11-23Fix whitespace (trailing spaces)Albrecht Schlosser
2022-11-23Have OPTION_USE_WAYLAND / --enable-wayland set to ON by defaultManoloFLTK
2022-11-23Wayland+CMake: stop forcing GTK_FOUND to 0ManoloFLTK
This removes the cause of this developer's message # FIXME: This needs to be redesigned! Forcing GTK_FOUND to 0 (NO) is a bad # FIXME: idea because there could be unwanted side effects. AlbrechtS
2022-11-18CMake+Wayland: check for presence of required software modulesManoloFLTK
Also, remove hardcoded path to wayland-protocols when CMake version ≥ 3.4
2022-11-13Make building Fluid optional. (#539)Matthias Melcher
2022-11-08Wayland + CMake: fix generated fltk-config that lacked -lX11ManoloFLTK
2022-10-16macOS + homebrew: restore building with CMake's OPTION_APPLE_X11ManoloFLTK
These option combinations work: -DOPTION_APPLE_X11 -DOPTION_APPLE_X11 -DOPTION_USE_CAIRO But -DOPTION_APPLE_X11 -DOPTION_USE_PANGO is not possible because homebrew doesn't provide the pangoxft package.
2022-09-09New OPTION_WAYLAND_ONLY for CMake to build pure Wayland platform.ManoloFLTK
2022-08-29Make hybrid Wayland/X11 platform.ManoloFLTK
2022-04-07Reorder CMake build options for better order of include directoriesAlbrecht Schlosser
This is only one minor step to remove issues of some CMake options that can cause conflicting include directories ("-I..." switches). See implementation note in CMake/options.cmake.
2022-04-05CMake: Restore removed HAVE_LIBPNG settingAlbrecht Schlosser
This was removed unintentionally.