summaryrefslogtreecommitdiff
path: root/CMake/fl_create_example.cmake
AgeCommit message (Collapse)Author
3 dayswip: forkmaxim nikonov
2025-03-16Remove libfltk_cairo (fltk::cairo)Albrecht Schlosser
This library is no longer needed and was "empty" for backwards compatibility since FLTK 1.4.0.
2024-02-13CMake: improve formatting, remove debug statementsAlbrecht 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-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-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-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-02-02Fix position() methods that shadow Fl_Widget::position()Matthias Melcher
* `FL_DEPRECATED` macro to mark `position()` method that shadow `Fl_Widget::position()` #69 (#666)
2022-11-13Make building Fluid optional. (#539)Matthias Melcher
2022-01-23Remove experimental platforms Android, Pico, SDL (PR #376)Albrecht Schlosser
... as discussed in fltk.coredev: "FLTK 1.4.0 release schedule" https://groups.google.com/g/fltkcoredev/c/PDbHTRpXVh0/m/JqboexZ_AwAJ
2021-12-18Generate FL/fl_config.h rather than FL/abi-version.hAlbrecht Schlosser
... as discussed in fltk.coredev in thread "RFC: introduce public config header <FL/fl_config.h>", see: https://groups.google.com/g/fltkcoredev/c/xLCs1AIXMVo/m/MHZpQggzAQAJ - Rename abi-version.h to fl_config.h, rename input files, update dependencies, .gitignore, CMake, configure and Makefiles. - Include Cairo options in FL/fl_config.h - Rename FLTK_USE_CAIRO to FLTK_HAVE_CAIROEXT for consistency. - Include <FL/fl_config.h> in config.h and wherever necessary, fix include order (move FL/Fl.H to the top) and more. - Move USE_X11 to fl_config.h and rename to FLTK_USE_X11 - Do not include <config.h> in Cairo demo program which is no longer required in Cairo programs since FLTK 1.4.0
2021-07-26Add CMake compatibility functions and macrosAlbrecht Schlosser
CMake/compatibility.cmake: define functions and macros to be used if a particular CMake functionality requires a higher CMake version than FLTK's minimum CMake version, see 'cmake_minimum_required(...)' in the root CMakeLists.txt. Note: target_link_directories() is available since CMake 3.13
2021-05-31Windows platform: use GDI+ to antialias oblique lines and curves.ManoloFLTK
2021-05-13Refactor macOS bundle generation to avoid "quarantine"Albrecht Schlosser
macOS Big Sur 11.3 introduced a new "security feature" such that app bundles created from existing bundle templates in downloaded files (tar distibutions, expanded) could no longer be executed without unsetting the "quarantine" attribute. This commit fixes this by creating all bundles from scratch. Known *workaround* for older tarballs and snapshots: $ xattr -d -r com.apple.quarantine xxx.app
2021-04-30CMake: improve detection and configuration of image libsAlbrecht Schlosser
Also: fix old (pre 3.13) link_directories() usage
2021-04-30Fix build with Cairo for CMake < 3.13Albrecht Schlosser
target_link_directories() was introduced in CMake 3.13
2021-04-08Fix CMake warningAlbrecht Schlosser
2021-04-08Fix macOS bundle: set missing fields for test appsAlbrecht Schlosser
- MACOSX_BUNDLE_BUNDLE_NAME: CFBundleName - MACOSX_BUNDLE_GUI_IDENTIFIER: CFBundleIdentifier test/demo.cxx: Remove confusing quotes from demo variable output.
2021-03-01Fix cairo build (autoconf + CMake) + README'sAlbrecht Schlosser
- rewrite to use pkg-config with both autoconf + CMake - remove hardcoded library names - fix build dependencies and search directories - remove or replace old and unused variables - update README files To be done: - implement fallback for autoconf/configure if pkg-config is missing - fix pango build (uses cairo internally)
2020-08-26macOS: don't create bundles when using X11Albrecht Schlosser
2020-08-18CMake: Fix macOS bundle wrapper generationAlbrecht Schlosser
Now bundle wrapper scripts are created in the particular build folder, i.e. in subdir 'Debug', 'Release' etc. in multi config builds (Xcode). To do this, the scripts are now copied whenever the target is built and not during the configuration phase. To do: "install" wrapper scripts.
2020-07-23Create macOS "bundle wrapper" scripts (#115)Albrecht Schlosser
These scripts must be installed side by side with the bundle with the same name and run the executable inside the bundle when executed.
2020-07-20CMake: simplify create_example macroAlbrecht Schlosser
- move target (demo) specific code from macro to CMakeLists.txt - refactor macOS specific code for a cleaner structure - improve documentation Note: CMake ignores platform specific code like creating bundles on other platforms, hence the entire code could be simplified (less conditional code)
2020-07-15CMake: refactor and reformat CMake filesAlbrecht Schlosser
- 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