If available, it is used on Linux regardless of the current desktop because
it offers free XDG portal integration, which means it picks the correct file
chooser on all desktops, and allows for meaningful file selection in sandbox
environments like Flatpak.
This removes the cause of this developer's message
# FIXME: This needs to be redesigned! Forcing GTK_FOUND to 0 (NO) is a bad
# FIXME: idea because there could be unwanted side effects. AlbrechtS
These option combinations work:
-DOPTION_APPLE_X11
-DOPTION_APPLE_X11 -DOPTION_USE_CAIRO
But
-DOPTION_APPLE_X11 -DOPTION_USE_PANGO
is not possible because homebrew doesn't provide the pangoxft package.
This is only one minor step to remove issues of some CMake options
that can cause conflicting include directories ("-I..." switches).
See implementation note in CMake/options.cmake.
This variable has never been used in the code. Configure and CMake
look for a *working* libpng (HAVE_PNG) and set variable HAVE_PNG_H
if the header <png.h> can be included.
The alternative to include <libpng/png.h> is always used in the #else
clause and doesn't need its own config variable. Configure and CMake
log what they find, hence this extra variable is not necessary.
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.
I decided not to install the man pages for consistency because we
don't install the executable programs. The instructions are commented
out only so they can be activated easily if this will be changed,
i.e. if we decide to install the test/game programs in the future.
Closes#23
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
- 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
The Visual Studio generator does often not find GL/glu.h and locale.h
although these headers are in the Visual Studio SDK. The warning has
been changed to "info" and the unnecessary and sometimes confusing
recommendation to rerun CMake has been removed.
fl_debug_pkg(...) can be used to display CMake variables set by
executing pkg_check_modules(). This is for CMake debugging only.
The CMake configuration summary displays configuration options
of Wayland, Pango, Xft, and Cairo configuration.
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.
... 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
Use of the kdialog command by class Fl_Naive_File_Chooser can now be turned off
at build-time through CMake OPTION_USE_KDIALOG.
If building via configure + make, set #define USE_KDIALOG to 0 in config.h before make.
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
Add CMake test for PTHREAD_MUTEX_RECURSIVE
Add autoconf/configure compile test for PTHREAD_MUTEX_RECURSIVE
Replace "#ifdef PTHREAD_MUTEX_RECURSIVE"
with "#ifdef HAVE_PTHREAD_MUTEX_RECURSIVE"
and define HAVE_PTHREAD_MUTEX_RECURSIVE in config.h
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