... 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.
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.
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
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.
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.
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, ...).
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.
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.
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
- 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
- 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.
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.
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
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
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
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
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
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
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
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
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
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
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
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