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.
- Add this include statement only where needed.
- Rename Fl_System_Driver::stat() to flstat().
This fixes an issue when using some (!) MinGW 64-bit build systems
that obviously '#define stat _stat64' or similar. This would
result in compiler problems if 'stat()' is a member function of
Fl_System_Driver.
This public method returns a pointer to the internal Fl_Image
object (const Fl_Image *). This is only for reference, the internal
image must not be modified by user code but it can be inspected and
copied to another image.
Regenerated src/fl_cmap.h with less spaces, updated copyright year.
Only whitespace and comments are changed in this file.
Note that src/cmap.cxx is not compiled to build the FLTK libs,
it's only used to generate src/fl_cmap.h.
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
These two functions are fully defined in the platform specific driver
methods, there's no need to define them in the base class.
This quick fix returns 0 from the base class method. The main reason
was to avoid a compiler error of MSVC 2010 and earlier, i.e. before
MSVC 2012.
Todo: int Fl_WinAPI_System_Driver::clocale_sscanf() needs to be fixed
because '_vsscanf_l()' (with lower case 'L' for 'locale') does not
exist in MSVC 2010 and earlier. It is not clear yet in which version
it was added - current MS docs show it in MSVC 2015 and later.
Note that this fix includes "../src/flstring.h" which makes the source
file no longer compileable without the full source code, e.g. by
using "fltk-config --compile ...". This might be fixed later. (?)
Code like "void copy(const char */*stuff*/, ...)" would issue the
warning "'*/' seen outside comment" which is formally true but ...
These warnings don't appear with newer MS compilers, but I fixed them
anyway.