summaryrefslogtreecommitdiff
path: root/examples/CMakeLists.txt
AgeCommit message (Collapse)Author
3 dayswip: forkmaxim nikonov
2024-05-13CMake: improve linking OpenGL3 example programs (#959)Albrecht Schlosser
- Remove find_library(LIB_GLEW ...) from 'resources.cmake' - Use the variable FLTK_GLEW_DIR to "find" a user supplied GLEW library for OpenGL3 example programs (examples/OpenGL3*.cxx). Both static and shared libs (DLLs) are supported, but the static library is preferred to avoid DLL dependencies. - Define preprocessor macro 'GLEW_STATIC' by CMake compile definitions if and only if the static glew library (glew32s) was found and linked. The previous code defined 'GLEW_STATIC' unconditionally in the source code which led to undefined references if a shared lib (DLL) was used.
2024-03-17Simplify examples/CMakeLists.txt (libcairo linkage)Albrecht Schlosser
Fl_Cairo_Window is included in fltk::fltk and libcairo is linked implicitly if FLTK was built with Cairo support.
2024-02-11Update examples/CMakeLists.txt to modern CMakeAlbrecht Schlosser
Also: set build requirement of OpenGL3 tests to C++11 to enable building in C++98 mode (if the compiler allows C++11). Note: this may be removed in 1.5.0 when FLTK requires C++11 anyway.
2024-02-07Introduce "Modern CMake" in FLTKAlbrecht Schlosser
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.
2023-12-16STR#3283: Add new Fl_Table right-click popup menu exampleGreg Ercolano
2023-10-16Add Fl_Grid widget and test and demo programsAlbrecht Schlosser
- FL/Fl_Grid.H: header file - src/Fl_Grid.cxx: implementation - examples/grid-simple.cxx: simple example program - test/cube.cxx: use Fl_Grid for layout - test/grid_alignment.cxx: test cell alignment and other functions - test/grid_buttons.cxx: demo program as discussed in fltk.general - test/grid_login.cxx: like test/flex_login.cxx but with Fl_Grid - test/flex_login.cxx: modified to match test/grid_login.cxx
2023-08-15Improved, yet compatible, widget callback system using macros (#729)Matthias Melcher
* adds FL/fl_callback.macros.H * adds FL_FUNCTION_CALLBACK_n(widget, function, [type, data]) * adds FL_METHOD_CALLBACK_n(widget, class, instance, method, [type, data]) * adds FL_INLINE_CALLBACK_n(widget, [type, name, data], callback_body) * adds `examples/callback` * full documentation
2023-01-21Animated GIF support (Fl_Anim_GIF_Image class) (#375)wcout
2022-11-19CMake: fix building examples w/o test programsAlbrecht Schlosser
As reported in fltk.coredev in thread "CMAKE build with build examples. On and test OFF fails" $ cmake .. -D FLTK_BUILD_EXAMPLES=ON -D FLTK_BUILD_TEST=OFF failed with: Unknown CMake command "FLTK_RUN_FLUID".
2022-08-07Add Fl_Flex demo "howto-flex-simple" to examplesAlbrecht Schlosser
This demo program uses an Fl_Flex widget with one row of buttons.
2022-03-09CMake: Fix OpenGL3 examples libglew link order (#226)Albrecht Schlosser
2022-03-07CMake/MinGW/MSYS2: fix building examples with libglew32 (#226)Albrecht Schlosser
CMake/resources.cmake: add NAMES option to find_library examples/CMakeLists.txt: fix linking libGLEW/libglew32
2022-01-23Remove experimental platforms Android, Pico, SDL (PR #376)Albrecht Schlosser
... as discussed in fltk.coredev: "FLTK 1.4.0 release schedule" https://groups.google.com/g/fltkcoredev/c/PDbHTRpXVh0/m/JqboexZ_AwAJ
2022-01-17Remove unnecessary CMake test statement (#358)Albrecht Schlosser
Sorry for the noise, this statement was included in my proposed patch.
2022-01-16Adding Albrecht's CMakeLists.txt patchGreg Ercolano
Albrecht submitted this in issue 358. Tested the variations: cmake .. -- examples and cairo off cmake -D FLTK_BUILD_EXAMPLES=on -- examples on, cairo off cmake -D FLTK_BUILD_EXAMPLES=on -D OPTION_CAIRO=on .. -- examples on, cairo on When examples are 'on', they build into the bin/examples directory.
2021-11-18Reformat and move clipboard demo from examples to test folderAlbrecht Schlosser
The clipboard demo is more a test program than an example and very useful even if the examples are not built. Also update dependencies.
2021-03-19Add fluid callback demo program to examples folderAlbrecht Schlosser
This example demonstrates how to build an entire program using fluid and how to add static and virtual class methods as callbacks.
2021-03-18Added chart-simple exampleGreg Ercolano
2021-02-15Update CMake and make files, minor edits onlyAlbrecht Schlosser
There are no functional changes to be expected, mostly formatting and comments.
2020-08-21CMake: add examples folder to build (optional)Albrecht Schlosser
- 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