Commit Graph

147 Commits

Author SHA1 Message Date
Albrecht Schlosser a484541d4b CMake: improve detection and configuration of image libs
Also: fix old (pre 3.13) link_directories() usage
2021-04-30 19:47:47 +02:00
Albrecht Schlosser 2555e3b37e Fix build with Cairo for CMake < 3.13
target_link_directories() was introduced in CMake 3.13
2021-04-30 12:46:58 +02:00
Albrecht Schlosser 556e895dc1 CMake: Document FLTKConfig.cmake and set FLTK_INCLUDE_DIR
Some of the output variables had not been documented, and the "new"
variable for FLTK include directories is 'FLTK_INCLUDE_DIRS' (plural)
rather than 'FLTK_INCLUDE_DIR'.

FLTK_INCLUDE_DIR is now also set for compatibility with FindFLTK.cmake
supplied by CMake.
2021-04-26 15:03:00 +02:00
Albrecht Schlosser 3611d788e3 Fix CMake install procedure (#212)
Only install header files to the FL/ include directory.
2021-04-11 21:56:28 +02:00
Albrecht Schlosser 1e2137668a Fix CMake warning 2021-04-08 15:51:05 +02:00
Albrecht Schlosser 02dfdd590d Fix macOS bundle: set missing fields for test apps
- MACOSX_BUNDLE_BUNDLE_NAME: CFBundleName
 - MACOSX_BUNDLE_GUI_IDENTIFIER: CFBundleIdentifier

test/demo.cxx: Remove confusing quotes from demo variable output.
2021-04-08 13:50:32 +02:00
Albrecht Schlosser 49a78bc482 Fix cairo build (autoconf + CMake) + README's
- rewrite to use pkg-config with both autoconf + CMake
- remove hardcoded library names
- fix build dependencies and search directories
- remove or replace old and unused variables
- update README files

To be done:
- implement fallback for autoconf/configure if pkg-config is missing
- fix pango build (uses cairo internally)
2021-03-01 10:45:59 +01:00
ManoloFLTK 1adaa3def2 Create classes Fl_XXX_Gl_Window_Driver according to driver model. 2021-02-16 09:29:13 +01:00
Albrecht Schlosser bbaec9bd88 Update CMake and make files, minor edits only
There are no functional changes to be expected, mostly formatting
and comments.
2021-02-15 19:45:20 +01:00
ManoloFLTK 8accc6e840
Pango ps (#148)
Use cairo-PostScript to output PostScript when pango is available.

This allows to draw in vectorial form any script.
Before, only the Latin script could be drawn to PostScript in vectorial form.
2020-10-28 17:19:05 +01:00
Albrecht Schlosser a6f9388f33 Fix version number in exported file FLTKConfig.cmake 2020-09-01 13:32:05 +02:00
ManoloFLTK 95799bd364 Fix for cmake + macOS + OPTION_APPLE_X11 regarding GLU-using apps. 2020-08-31 16:17:04 +02:00
ManoloFLTK 87b799ba07 make + macOS: further fix to the construction of fltk-config 2020-08-31 12:35:25 +02:00
ManoloFLTK 1f20806466 Remove VERSION_GREATER_EQUAL that requires a more recent CMake version than 3.2.3
Replace it by (NOT VERSION_LESS)
2020-08-27 17:49:10 +02:00
ManoloFLTK 9a799da70a Fix cmake-based build under macOS with OPTION_APPLE_X11.
cmake now correctly finds GLU support when present.
2020-08-26 22:01:09 +02:00
ManoloFLTK 1ace96e470 Fix for cmake-based construction of the fltk-config script under macOS.
This also supports OPTION_APPLE_X11 and OPTION_USE_PANGO.
2020-08-26 21:37:36 +02:00
Albrecht Schlosser 2f26170a2a macOS: don't create bundles when using X11 2020-08-26 12:46:00 +02:00
ManoloFLTK d94496582c Towards construction of fltk-config by CMake under macOS (WIP). 2020-08-25 18:41:43 +02:00
Albrecht Schlosser 3b9a04ae2e CMake: add examples folder to build (optional)
- replace misnamed option 'OPTION_BUILD_EXAMPLES' with 'FLTK_BUILD_TEST'
- add option 'FLTK_BUILD_EXAMPLES' to build apps in examples folder
- move examples/fltk-versions.cxx to test/fltk-versions.cxx
- [Travis-CI] enable option 'FLTK_BUILD_EXAMPLES' for automatic builds
2020-08-21 18:55:12 +02:00
Albrecht Schlosser fcd5239adc CMake: Fix macOS bundle wrapper generation
Now bundle wrapper scripts are created in the particular build folder,
i.e. in subdir 'Debug', 'Release' etc. in multi config builds (Xcode).
To do this, the scripts are now copied whenever the target is built
and not during the configuration phase.

To do: "install" wrapper scripts.
2020-08-18 16:23:25 +02:00
Albrecht Schlosser 332003cd13 Create macOS "bundle wrapper" scripts (#115)
These scripts must be installed side by side with the bundle with the
same name and run the executable inside the bundle when executed.
2020-07-23 02:07:43 +02:00
Albrecht Schlosser 4858882e1e CMake: simplify create_example macro
- move target (demo) specific code from macro to CMakeLists.txt
- refactor macOS specific code for a cleaner structure
- improve documentation

Note: CMake ignores platform specific code like creating bundles on
other platforms, hence the entire code could be simplified (less
conditional code)
2020-07-20 11:02:01 +02:00
Albrecht Schlosser 1657654377 CMake: fix FLTK_RUN_FLUID macro
The target variable should be set outside of the loop.
2020-07-20 10:19:47 +02:00
Albrecht Schlosser 720b84ef9d CMake: refactor and reformat CMake files
- 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-15 00:34:53 +02:00
Albrecht Schlosser f09e17c3c5 Remove $Id$ tags, update URL's, and more
- 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.
2020-07-06 20:28:20 +02:00
ManoloFLTK 26e6c3f930 Add classes Fl_SVG_File_Surface and Fl_EPS_File_Surface to draw to SVG and EPS.
Test programs device and pixmap_browser use these new classes.
Class Fl_SVG_File_Surface can be optionally made non functional using the
--disable-svg configure option or turning off OPTION_USE_SVG in CMake.
Class Fl_EPS_File_Surface can be optionally made non functional using the
--disable-print configure option or turning off OPTION_PRINT_SUPPORT in CMake.
2020-06-27 09:56:00 +02:00
Taeril 930013638b Quick fix for inability to link with pango from fltk-config
Commit 6fe226cb80 introduced use of
pkg-config which broke linking from fltk-config if FLTK was
configured to use pango library.

This patch duplicates line from another if branch that just adds
libraries assuming that if pkg-config found pangoxft that there
are present all it's requirements.
2020-06-21 14:29:18 +02:00
Albrecht Schlosser b8318480f5 CMake: Build static and shared libs side-by-side
Clean up library and variable names.
Remove '_SHARED' suffix from library (output) filenames.

This commit was inspired by David Runge ('dvzrv'), thanks.
See PR #21.

Fixes #21
2020-06-13 14:22:22 +02:00
Albrecht Schlosser 6279ab0586 CMake: Deprecate FLTK_USE_FILE (UseFLTK.cmake)
Cherry-pick the essential changes from FLTK 1.3 since this change
had not been ported to 1.4 yet.

To do: my current plan is to consolidate 1.3 and 1.4 CMake files
as far as possible (with the exceptions of source files, obviously)
and to redesign / refactor CMake files later in this process or
maybe only for 1.4 if it turns out to be too much to backport.
2020-06-13 13:51:35 +02:00
Albrecht Schlosser b38317b8a5 Unexpand $Id$ marker in the last remaining file 2020-04-22 15:42:22 +02:00
ManoloFLTK 6fe226cb80 CMake: use pkg_check_modules to search for pangoxft
Command pkg_check_modules is present in CMake 2.6
2020-04-15 17:07:23 +02:00
Albrecht Schlosser 2d2c2ff45e CMake: set option to build docs (default): ON
This option does not build the documentation automatically, docs
still must be built manually, e.g. 'make docs' or 'make html'.
2020-02-14 15:23:53 +01:00
ManoloFLTK ed0c443253 Set OPTION_USE_SYSTEM_LIBPNG/JPEG off under macOS by default 2020-01-18 16:05:29 +01:00
ManoloFLTK ae29e4d0e4 Remove temporary CMake option OPTION_HIDPI no longer used. 2020-01-18 09:14:51 +01:00
ManoloFLTK 9ff6ad7885 Continue CMake support of the Darwin+XQuartz+fink test platform 2019-10-31 07:30:39 +01:00
ManoloFLTK 527327b8e4 Restore CMake support of Darwin + XQuartz + fink test platform 2019-10-30 21:13:52 +01:00
ManoloFLTK 8c6f1b8ece Restore CMake support of Darwin + XQuartz + fink 2019-10-30 18:57:47 +01:00
Albrecht Schlosser c5cc558d6f Fix typo in CMake macro FL_ADD_LIBRARY 2019-06-04 18:21:04 +02:00
Lasse Lopperi e178d14668 Correct config installation path on macOS
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.
2019-05-12 18:06:00 +02:00
Matthias Melcher 2f0e45e7a7 Android CMake: icons, docs, more apps 2019-01-17 21:29:24 +01:00
Matthias Melcher 111985665d Andoird CMake: trying to autocreate Fluid files 2019-01-17 00:49:44 +01:00
Matthias Melcher 563baced13 Android CMake: fix, more autogenerated files
Fixed a bug that would cause an error is Android Build was NOT
defined. Creating list of test targets automatically.
2019-01-16 02:12:29 +01:00
Matthias Melcher 6de1c93e54 Android CMake: macro for multiple tests
Added a macro that creates the IDE files for a named test.
This is just a rough layout and will only work for the
simpelest of test targets.
2019-01-16 01:25:59 +01:00
Matthias Melcher b450cea7e2 Android: starting to use CMake to build AndroidStudio files. 2019-01-15 01:22:18 +01:00
Matthias Melcher e25511131b Android: modifying CMake to also create AndroidStudio IDE 2019-01-14 23:27:34 +01:00
Matthias Melcher 16181a3afb Android: modifying CMake to also create AndroidStudio IDE 2019-01-14 23:27:12 +01:00
Albrecht Schlosser de199c327e Add a CMake option to generate driver (developer) documentation.
Generating driver documentation can now be configured with CMake. The new
configuration OPTION_INCLUDE_DRIVER_DOCUMENTATION is "marked as advanced"
since only advanced users and/or FLTK developers need this.

Previously this could only be achieved by editing documentation/Doxyfile.in.

Added missing documentation option descriptions as well.
2018-12-29 20:35:10 +01:00
fabien 65d90c33dc Removes few tabs from options.cmake. When removing tabs, also apply cmp standard (two spaces) recommended indentation. 2018-12-22 15:01:20 -06:00
fabien 9338385da7 remove unnecessary double braces in option.cmake cairo detection code 2018-12-22 10:35:52 -06:00
fabien e3b289e008 CMake CAIRO support minor improvements: Make the conditional code more readeable by reusing the already parsed PKG_CAIRO_FOUND variable instead of testing for it again, which also simplifies the preconditions testing. Fix typo (. in endif statement comment). 2018-12-22 08:26:56 -06:00