Commit Graph

113 Commits

Author SHA1 Message Date
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
Albrecht Schlosser 88129db051 Improve CMake's Cairo detection and issue error message...
... if Cairo was requested (OPTION_CAIRO or OPTION_CAIROEXT) but
Cairo was not found. CMake generation is terminated with a fatal error.

The user has two choices: install Cairo libs and headers or disable
OPTION_CAIRO and OPTION_CAIROEXT.
2018-12-20 19:12:50 +01:00
ManoloFLTK 75293c1725 macOS + CMake + OPTION_APPLE_X11 : restore building of GLU-based test apps. 2018-12-16 19:01:56 +01:00
Matthias Melcher b1598dc703 Removed macro FL_PORTING, as it has been more confusing than helpful.
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-06-23 17:04:18 +00:00
Albrecht Schlosser ba58edb33c Add missing winsock dll to variables.cmake (fixes fltk-config).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12948 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-19 10:33:41 +00:00
Albrecht Schlosser e0a15603dd CMake/fltk-config: update fltk-config (LDFLAGS) for MacOS.
This is a preliminary patch to enable linking with pango on MacOS
when fltk-config is used. A better solution is under development.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12759 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-16 14:12:05 +00:00
Albrecht Schlosser 5c2d98a5fc CMake + configure: improve generation of fltk-config.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12692 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-25 19:25:45 +00:00
Albrecht Schlosser c9d4df288c CMake: fix fltk-config generation for MacOS.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12687 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-24 13:44:06 +00:00
Albrecht Schlosser 7d1488507d CMake: Fix fltk-config for Windows and Unix/Linux.
This update ought to work with

  fltk-config [--use-images] [--use-gl] --compile <c source file>

on both Windows and Unix/Linux when built with CMake. It was tested
under Windows and Linux using fltk-config directly from the build tree,
but it should work as well after installation.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12686 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-23 19:41:52 +00:00
Albrecht Schlosser 6721ba67eb CMake: fix generated fltk-config for Windows (partially).
This makes 'fltk-config --compile' work with simple test applications
like hello.cxx etc.

It may not yet work with other options though, particularly with
--use-gl or --use-images, but it's an improvement.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12676 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-18 12:31:16 +00:00
Albrecht Schlosser 50f351e5a5 CMake: fix debug macro for CMake versions before 3.4.
Note: string(APPEND ...) was introduced in CMake 3.4.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12675 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-18 11:25:51 +00:00
Albrecht Schlosser c7b5d61eb0 CMake: add macro fl_debug_var to debug variables.
Some debug messages are included, but currently disabled.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12658 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09 20:51:15 +00:00
Albrecht Schlosser 52ae3582a2 Replace "WIN32" with "_WIN32" or "Windows".
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-02-09 14:39:42 +00:00
Albrecht Schlosser baffc84fa1 CMake: test option compatibility: Pango requires Xft.
Abort CMake configuration/generation if Xft is disabled or not found
but Pango is requested because Pango requires Xft support. A detailed
warning message is issued before the CMake generation is aborted.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12631 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-14 19:34:39 +00:00
Albrecht Schlosser 7aef0cad39 CMake: enable building FLTK in a subdirectory of another project.
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-10 20:49:03 +00:00
Manolo Gouy 9f0e9ff813 MacOS + CMake: restore use of OPTION_APPLE_X11 under MacOS 10.13
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
2018-01-08 20:52:48 +00:00
Albrecht Schlosser cf198735de CMake: Fix missing WIN32 definition on Windows platforms.
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-12-28 22:59:44 +00:00
Manolo Gouy 1a28d85dc3 Add new Fl_SVG_Image class to support scalable vector graphics images using the (modified) nanosvg software.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12413 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 13:14:25 +00:00
Albrecht Schlosser 9d10d08ed0 [CMake] Add an option to use High-DPI support (Windows only).
This option can be used with CMake to configure the experimental
high-DPI support under Windows. The option may be removed once high-DPI
support under Windows is complete.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12338 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-18 20:15:02 +00:00
Albrecht Schlosser 601e86fba5 CMake: fix potential compiler warning in test file.
clang reports: control reaches end of non-void function [-Wreturn-type]


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12283 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-29 18:27:07 +00:00
Albrecht Schlosser 90f6c8ee26 Update copyright year(s).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12282 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-29 18:12:57 +00:00
Albrecht Schlosser 3eb6b7ea58 CMake: replace improperly used variables with correct ones.
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
2017-06-29 17:51:27 +00:00
Albrecht Schlosser 54596de1c3 [CMake] Fix Visual Studio header detection.
This commit fixes a CMake issue if CMake is invoked from a desktop icon
or the Windows menu, i.e. not within the correct environment to find all
required header files.

We recommend to run CMake from a "Developer Command Prompt for Visual Studio X",
but sometimes users click on their desktop icon and run CMake without the
correct context. In this case some header files in the Windows SDK's are not
found by CMake.

The solution is to issue a warning and "fix" the header detection by faking
that the headers were found, because they are always available in Visual
Studio. The affected headers <locale.h> and <GL/glu.h> were set to "found"
in the bundles IDE's in FLTK 1.3 as well, so there should be no issue with
this fix.

It is also recommended by the CMake folks, i.e. they suggest not to search
for these special header files that are known to exist always.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12209 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-17 17:42:50 +00:00
Albrecht Schlosser 83b5df04fb [CMake] Remove unused header test HAVE_GL_GL_H (GL/gl.h).
Note: the test for OpenGL works slightly different with CMake vs. configure.

The CMake (cache) variable HAVE_GL_GL_H was never used.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12203 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-17 15:59:07 +00:00
Albrecht Schlosser 16774ddc4e Rename test/help demo program to test/help_dialog.
This change avoids a name conflict with CMake's auto-generated target 'help'
for "Unix Makefiles", "Ninja", and supposedly other generators as well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12171 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-08 02:06:52 +00:00
Manolo Gouy 461750c38e X11 platform: Add optional use of the pango library to draw text, gaining the possibility to draw text in any script supported by Unicode.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12153 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-21 15:05:02 +00:00
Albrecht Schlosser 307dd033f0 [CMake] Rewrite pthreads checks for compatibility with configure.
Main point: pthreads must not be checked under Windows (e.g. MinGW)
since Windows always uses native Windows threads (unless Cygwin is used).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12138 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-06 19:20:34 +00:00
Manolo Gouy 21781c3fe9 Add --enable-print option to configure to allow building without print support on X11 platforms.
Also, the NO_PRINT_SUPPORT preprocessor variable is renamed FL_NO_PRINT_SUPPORT.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12131 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-01 17:31:29 +00:00
Manolo Gouy c794b5ecbd MacOS platform: restore CMake building with OPTION_APPLE_X11 on.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12128 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-01 06:31:25 +00:00
Albrecht Schlosser 78d853891c [CMake] Fix Windows dll build with Visual Studio generator.
Now you can set OPTION_BUILD_SHARED_LIBS:BOOL=ON to build FLTK dll's with
Visual Studio. Tested and works (Visual Studio 2010 + 2015).

Note: Linux fixes included, tested and works (Ubuntu).

Todo: dll names and target directories may need some changes.
We really need to get rid of that "_SHARED" suffix in .so names.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11867 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-09 14:11:42 +00:00
Manolo Gouy e5e7fa9b1e Fix CMake building under Apple platform that used to set HAVE_GL_GLU_H to 0
On the Mac OS platform, file glu.h is not in a directory called GL.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-05 17:14:55 +00:00
Albrecht Schlosser d0fa58f700 Clarification and better documentation of ABI version configuration.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11804 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-09 18:47:06 +00:00
Manolo Gouy 68cf00ee09 THE best way to test for availability of dlsym().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11779 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-06-14 05:19:32 +00:00
Albrecht Schlosser 1f81808b10 [CMake] Fix restoration of CMAKE_REQUIRED_LIBRARIES.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11777 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-06-13 22:32:01 +00:00
Manolo Gouy dc2fd2befc Fix cases where function dlysym() is not in library libdl.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11774 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-06-13 12:29:54 +00:00