summaryrefslogtreecommitdiff
path: root/CMake
AgeCommit message (Collapse)Author
2024-05-01CMake/debug: add more properties to fl_debug_target()Albrecht Schlosser
This commit is only for CMake debugging.
2024-04-27CMake: make compile definition "FL_DLL" public for MSVC (#960)Albrecht Schlosser
Visual Studio projects that link to the FLTK DLL (fltk::fltk-shared) inherit the compile definition set by the DLL target and will be compiled with "-D FL_DLL" as required w/o the user project having to set this preprocessor macro explicitly. Todo: documentation will follow...
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-20CMake build summary: output libdecor location if foundAlbrecht Schlosser
Wayland only: output either the libdecor location or "Bundled".
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-04-08Improve CMake build configuration summaryAlbrecht Schlosser
- simplify and unify build option output - alignment can be changed in only 2 macros in CMake/fl_summary.cmake - output system library location of image libraries if applicable
2024-04-05CMake: Fix detection of trunc() for WindowsAlbrecht Schlosser
2024-04-02Add replacement for potentially missing trunc() (#944)Albrecht Schlosser
- add configure + CMake checks to define HAVE_TRUNC in config.h - src/Fl_Timeout.cxx: add local replacement function
2024-03-24CMake for macOS platform: improve handling of -framework link argumentsManoloFLTK
2024-03-23macOS: remove deprecated use of property allowedFileTypes in class NSSavePanelManoloFLTK
The recommended replacement requires macos ≥ 11.0 and a new framework: UniformTypeIdentifiers
2024-03-18CMake: formatting onlyAlbrecht Schlosser
2024-03-18Replace setenv() with putenv() on old systems (+937)Albrecht Schlosser
Add system check for setenv() function in configure and CMake.
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-14CMake: remove unintended debug outputAlbrecht Schlosser
2024-02-14CMake: fix installation on macOSAlbrecht Schlosser
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-13CMake: simplify resources.cmakeAlbrecht Schlosser
Note: CheckIncludeFiles caches the result in an 'internal' variable. Hence mark_as_advanced() is not necessary for these variables.
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-10Modern CMake: export shared libraries and fltk-optionsAlbrecht Schlosser
2024-02-09Fix Cairo related build issues (missing Cairo lib)Albrecht Schlosser
... particularly for shared libs
2024-02-08CMake cleanup: fix alignmentAlbrecht Schlosser
2024-02-08CMake cleanup: mark two more cache variables "advanced"Albrecht Schlosser
2024-02-07Fix GitHub CI build and minor CMake issuesAlbrecht Schlosser
- GitHub CI: fix wrong CMake option name - fl_add_library: disable debug output (MSVC), fix formatting
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-21Ensure that exporting 'fl_disable_wayland' worksAlbrecht Schlosser
... with cmake_minimum_required(VERSION 3.4) or higher. This version sets CMP0065 to 'NEW' which by default inhibits exporting global symbols from executable programs. For details see CMake policy CMP0065 and README.Wayland.txt.
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-12CMake: remove deprecated 'exec_program' from target 'uninstall'Albrecht Schlosser
1. 'exec_program()' should be replaced with 'execute_process()'. Done. 2. 'cmake -E remove' is broken and deprecated since 3.17, hence we use 'cmake -E rm' (!) for CMake since 3.17 and 'cmake -E remove' only for older CMake versions.
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-03CMake: Remove UseFLTK.cmake generation and usageAlbrecht Schlosser
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-25CMake/Windows/MSVC: add DLL path as target propertyAlbrecht Schlosser
This modifies the debug environment so demo programs linked to FLTK DLL's can be debugged w/o copying FLTK DLL's to the build folders of the demo programs. This is work in progress and may be improved in a future commit but it works as it is now for all demo programs.
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-08-28CMake: Make compile definitions 'FL_LIBRARY' and 'FL_DLL' privateAlbrecht Schlosser
... so they are not inherited by consumers of the library. Remove 'add_definitions(-DFL_LIBRARY)' from src/CMakeLists.txt This is not necessary, see CMake/fl_add_library.cmake Don't set obsolete property 'CLEAN_DIRECT_OUTPUT' which was removed in CMake 2.8.0.
2023-08-26CMake: fix formatting, add more debug outputAlbrecht Schlosser
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