summaryrefslogtreecommitdiff
path: root/CMake/setup.cmake
AgeCommit message (Collapse)Author
3 dayswip: forkmaxim nikonov
2025-01-16MSYS2: Correctly detect ucrt64 environment (PR #1167)Albrecht Schlosser
This fix is different than the proposed PR. The PR will be closed and not merged. Closes #1167.
2024-11-05MacOS: Fix build folder for detection of SDK version (#1103)Albrecht Schlosser
Sorry for the noise...
2024-11-05MacOS: Improve detection of SDK version (#1103)Albrecht Schlosser
CMake/macOSMaxAllowed.c: avoid C compiler warning in test code CMake/setup.cmake, technical changes: - optimization: test SDK 15.0.0 first to avoid unnecessary test if true - use a function instead of a macro - use different names for (cached) result variables - use prefix FLTK_ for cache variables Note: the cache variables are marked 'internal': you may need to grep CMakeCache.txt to view them.
2024-11-04MacOS version check using try_compile: #1103Matthias Melcher
This change will work as well when cross-compiling.
2024-11-04Using try_run to get __MAC_OS_X_VERSION_MAX_ALLOWED (#1105)Matthias Melcher
2024-08-30macOS: Fix installing partial 'FLTK.framework' (#961)Albrecht Schlosser
... which is not a real macOS "Framework". Note that users building and *installing* FLTK should either install in a fresh directory or delete the entire 'FLTK.framework' tree if they are reusing an existing install directory because it will not be deleted by subsequent installs.
2024-06-16Link frameworks used by recent macOS versions with -weak_frameworkManoloFLTK
This allows FLTK apps to use the recent frameworks when they run on recent macOS versions even if the minimum supported macOS version of these apps is more ancient than the framework.
2024-06-14macOS 15.0 Sequoia: fix capture of window titlebarsManoloFLTK
The previous procedure using CGWindowListCreateImageFromArray() is obsoleted in macOS 15.0 . The new procedure requires an additional framework: ScreenCaptureKit; FLTK uses it only for macOS ≥ 15.0
2024-05-03macOS + CMake: fix use of optional framework UniformTypeIdentifiersManoloFLTK
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-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-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-11-15CMake: Raise cmake_minimum_required from 3.12 to 3.15Albrecht Schlosser
Remove code that checks CMake versions lower than 3.15
2023-02-06Remove usage of __APPLE_QUARTZ__ (#673)ManoloFLTK
2023-02-02Allow cmake -DOPTION_APPLE_X11=On without -U__APPLE__ManoloFLTK
2022-03-26CMake: Remove obsolete platform dependent instructionsAlbrecht Schlosser
The intended effect (building a Windows "GUI" application), is correctly achieved using the "WIN32" option of add_executable() selectively where appropriate rather than setting this platform specific option for *all* (Windows) executables when using GNU compilers (MinGW, MSYS2, Cygwin, ...).
2022-03-26CMake/MSVC: limit "/utf-8" to VS 2015 and later (PR #415)Albrecht Schlosser
According to PR #415 this switch was added in Visual Studio 2015 Update 3. However, version "1900" does not distinguish updates, hence Visual Studio 2015 up to Update 2 may fail to compile with this addition. Installing the updates would obviously fix this.
2022-03-26Add UTF-8 encoding support in setup.cmake for MSVC (PR #415)ZJUGKC
The source files are all encoded by UTF-8 without BOM. This will raise warnings and errors when compiling by the MSVC with some active code pages (ACP). The file `test/ask.cxx` contains such characters with UTF-8 encoding. Adding `/utf-8` here is equivalent to specifying `/source-charset:utf-8 /execution-charset:utf-8`, and all warnings and errors are removed.
2022-03-25CMake: add missing variable initializationAlbrecht Schlosser
Although CMake uses previously undefined variables like empty strings it could happen that variables set in the calling context by other projects initialized some variables with unexpected values. Example: FLTK_LIBRARIES could have been initialized by previous execution of 'find_package(FLTK ...)' in a project using FLTK
2022-03-13Fix CMake version test in setup.cmakeAlbrecht Schlosser
Note: CMake operator 'VERSION_GREATER_EQUAL' was added in CMake 3.7 but we allow 3.2.3
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-03CMake for Apple Xcode usability improvementsMatthias Melcher
2020-08-27Remove VERSION_GREATER_EQUAL that requires a more recent CMake version than ↵ManoloFLTK
3.2.3 Replace it by (NOT VERSION_LESS)
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.
2019-10-30Restore CMake support of Darwin + XQuartz + fink test platformManoloFLTK
2019-05-12Correct config installation path on macOSLasse Lopperi
Before: install/FLTK/.framework/Resources/CMake/FLTKConfig.cmake After: install/FLTK.framework/Resources/CMake/FLTKConfig.cmake See https://cmake.org/cmake/help/v3.0/command/find_package.html for definitions of expected installation paths.
2018-06-23Removed macro FL_PORTING, as it has been more confusing than helpful.Matthias Melcher
The original intention of FL_PORTING was to mark all places in the source code where changes are required to port FLTK to a new platform. Thanks to the driver system, this approach has become somewhat misleading, so I removed all references. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12969 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09Replace "WIN32" with "_WIN32" or "Windows".Albrecht Schlosser
Replace compiler/preprocessor/platform macro "WIN32" with "_WIN32". Replace "WIN32" in text and documentation with "Windows". Replace "MSWindows" with "Windows". To do: README.Windows.txt (and maybe other documentation as well) needs updates. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12655 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
2018-01-08MacOS + CMake: restore use of OPTION_APPLE_X11 under MacOS 10.13Manolo Gouy
It's necessary to compile with -mmacosx-version-min=10.8 and to link with -lfontconfig when Xft is used git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12627 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-28CMake: Fix missing WIN32 definition on Windows platforms.Albrecht Schlosser
Although some Windows compilers still #define WIN32, more and more standard compliant compilers only #define _WIN32. FLTK *did* #define WIN32 for all Windows targets with autoconf/configure, but that bit was lost for CMake builds. This is necessary until we replace WIN32 with _WIN32 throughout the Windows specific code. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12612 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
2016-03-02Add support for SDL as a base library on OS X.Matthias Melcher
This commit adds the basic setup in CMake to allow SDL as a base library for FLTK on OS X (and probably for other platforms as well). The SDL library driver set is derived from yet another new driver set named 'Pico'. 'Pico' is a base class for a driver that will allow porting of FLTK with the tinyest amount of effort. This implementation of the SDL driver shall be documented very well to explain the porting process. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11262 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-30Bump version numbers for next minor release: FLTK 1.4.0.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11088 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-31Mac OS: modified CMake config files to allow use of OPTION_APPLE_X11Manolo Gouy
to build an X11-using version of FLTK on the Mac OS platform. This matches the recent support of the --enable-x11 option by the configure script on the mac. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10986 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-04-10CMake: Remove installation of example programs (STR #3194).Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10695 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-07CMake] install CMake files in DATADIR instead of LIBDIR under Linux.Albrecht Schlosser
FLTKConfig.cmake and others have been installed in arch dependent LIBDIR, but should be in arch independent DATADIR. The result is that you can always find FLTKConfig.cmake in <prefix>/share/fltk. This is where "/path/to/fltk" should point to when FLTK is used in external projects (see README.CMake.txt). Todo: test if find_package works w/o defining FLTK_DIR when installed in a standard location. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10682 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-03-10[Version 1.3.4] Update version numbers - hopefully complete.Albrecht Schlosser
Note to devs: if I missed something, please mark follow-up commits with [Version 1.3.4] so we can find the necessary commits for version updates. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10612 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-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-10-05Bump version numbers to 1.3.3.Albrecht Schlosser
All fluid .fl files have been rewritten with fluid 1.3.3 and may differ somehow, but there are no significant changes. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10353 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