summaryrefslogtreecommitdiff
path: root/CMake/export.cmake
AgeCommit message (Collapse)Author
3 dayswip: forkmaxim nikonov
2025-05-06Remove hardcoded version numbers: part 1Albrecht Schlosser
The goal is to change the version number for a new release only in CMakeLists.txt. This is the first step. Details: - CMake/gen_config.cmake: this new file is included to generate the header files config.h (private, root directory), and FL/fl_config.h (public, can be installed). This file implements also ABI version checks (removed from FL/Enumerations.H and with more checks). Warnings are issued if the chosen ABI version is invalid. - CMake/export.cmake: code to generate 'config.h' was moved to CMake/gen_config.cmake. - CMake/options.cmake: set default of FLTK_BUILD_FORMS=OFF + comments - CMakeLists.txt: move generation of FL/fl_config.h to gen_config.cmake, add API and ABI versions to CMake summary, - FL/Enumerations.H: remove most of the version number details which are now included in FL/fl_config.h. This needed also some doxygen related changes. - README.CMake.txt: improve docs of FL_ABI_VERSION and some more. Reflect the new default of CMake option FLTK_BUILD_FORMS (OFF). - documentation/Doxyfile.in: add FL/fl_config.h to file list. This file is created in the build tree (and may be "installed"). - fl_config.h.in: add version number details that have been moved here from Enumerations.H (used to generate FL/fl_config.h).
2025-05-05Rename config header input files to better namesAlbrecht Schlosser
Up to FLTK 1.4 we had two distinct input files for each header file: one for configure and one for CMake. Since 1.5 we have only one input file for each header which can now have a more appropriate name. 1) configh.cmake.in -> config.h.in 2) fl_config.cmake.in -> fl_config.h.in
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-10Modern CMake: export shared libraries and fltk-optionsAlbrecht 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-03CMake: Remove UseFLTK.cmake generation and usageAlbrecht Schlosser
2022-11-13Make building Fluid optional. (#539)Matthias Melcher
2022-04-03Build and use fluid-cmd on Windows for .fl files (#224, #293)Albrecht Schlosser
On Windows fluid.exe is a "GUI" program and does not allow console output which can be a problem in automated builds. In Visual Studio the fluid GUI program would pop up console windows when generating .cxx and .h files from .fl files. The new (additional) fluid-cmd.exe is built as console application for users that need it and it is used in the FLTK build process on Windows to convert the .fl files.
2022-03-13CMake: Improve fltk-config generationAlbrecht Schlosser
- set executable permissions on MinGW and more platforms - add missing link libraries - improve code formatting (indent) - mark some variables as advanced - simplify search for glib-2.0
2021-12-20CMake: export Cairo include directories (issue #350)Albrecht Schlosser
If a user project is built using a FLTK library generated by CMake with Cairo support then the CMake variable FLTK_INCLUDE_DIRECTORIES now includes the required Cairo include directories.
2021-11-11CMake: Build fluid when cross-compilingAlbrecht 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
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- 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.
2018-02-23CMake: Fix fltk-config for Windows and Unix/Linux.Albrecht Schlosser
This update ought to work with fltk-config [--use-images] [--use-gl] --compile <c source file> on both Windows and Unix/Linux when built with CMake. It was tested under Windows and Linux using fltk-config directly from the build tree, but it should work as well after installation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12686 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-18CMake: fix generated fltk-config for Windows (partially).Albrecht Schlosser
This makes 'fltk-config --compile' work with simple test applications like hello.cxx etc. It may not yet work with other options though, particularly with --use-gl or --use-images, but it's an improvement. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12676 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-10CMake: enable building FLTK in a subdirectory of another project.Albrecht Schlosser
Basically replace CMAKE_XXX_DIR with CMAKE_CURRENT_XXX_DIR where XXX = SOURCE or BINARY. Patch proposal by cleanrock, FLTK PR #4: https://github.com/fltk/test-only/pull/4 Patch modified to fix target dirs for test programs and doxygen docs. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12630 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-29Update copyright year(s).Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12282 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-29CMake: replace improperly used variables with correct ones.Albrecht Schlosser
CMake variables FLTK_SOURCE_DIR and FLTK_BINARY_DIR are only defined if the project name is exactly "FLTK" (all uppercase). These variables are generated (set) by CMake as <PROJECT_NAME>_SOURCE_DIR etc. The correct variables are CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR, respectively, which are always defined. This commit enables future changes of the FLTK project name, e.g. to "fltk" or "fltk-1.4.0" (a versioned project name), if we like... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12281 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-30[CMake] config.h, part 2 - full compatibility with autoconf.Albrecht Schlosser
This commit makes the file config.h generated by CMake 100% compatible with the one generated by autoconf/configure. Fixes in this commit: - Set FLTK_DATADIR and FLTK_DOCDIR with the same default values. Note: needs some cleanup, option values are not clear, '/fltk' is currently appended in export.cmake (needs improvement). - Simulation of autoconf macro AC_HEADER_DIRENT for correct definition of only one 'dirent' header file. - Fix more function checks: - dlsym - png_get_valid - png_set_tRNS_to_alpha - Improve "Big Endian" check for __APPLE__ (mac_endianness.h). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10985 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-12Fix fltk-config for CMake build.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10787 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-25[CMake] Fix CMake build's fltk-config (STR #3217).Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10716 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-16[CMake] Improve installation, support DESTDIR, and more (STR #3149).Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10580 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-24[CMake] Fix CMake 3.1 warning about new policy CMP0053.Albrecht Schlosser
CMake Warning (dev) at CMake/export.cmake:48 (set): Policy CMP0053 is not set: Simplify variable reference and escape sequence evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Changed old-style @variable@ replacement to ${variable}. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10467 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-22Set correct svn properties on CMake files.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10466 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-27CMake enhancements, as discussed in STR #3055.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10342 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-02-09Split CMake files for better maintenance, as discussed in fltk.general.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10098 ea41ed52-d2ee-0310-a9c1-e6b18d33e121