summaryrefslogtreecommitdiff
path: root/CMake/fl_add_library.cmake
AgeCommit message (Collapse)Author
3 dayswip: forkmaxim nikonov
2025-03-13CMake: improve setting C++ standard and configuration summaryAlbrecht Schlosser
CMake/fl_add_library.cmake: set target_compile_features(.. cxx_std_NN) which is inherited by consumers of the library. This prevents CMake user projects from failing if they would otherwise compile with an older C++ standard. CMake/fl_debug_var.cmake: add INTERFACE_COMPILE_FEATURES to fl_debug_target() CMake/fl_summary.cmake: update summary format for longer variable names CMakeLists.txt: - check CMAKE_CXX_STANDARD given by the user (commandline) and set C++ standard related CMake variables in the CMake cache. The latter is experimental: setting in the cache may be reverted. - add C++ standard related info to configure summary.
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-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-02-13CMake: improve formatting, remove debug statementsAlbrecht Schlosser
2024-02-09Fix Cairo related build issues (missing Cairo lib)Albrecht Schlosser
... particularly for shared libs
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-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
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