summaryrefslogtreecommitdiff
path: root/CMake/fl_create_example.cmake
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2021-12-18 22:42:30 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2021-12-18 22:44:08 +0100
commit5438954d8c6213f1b0cc9d23b70ffaae388e1d60 (patch)
tree101eeda4bf98583d566eeb4b0870d2bde95dea69 /CMake/fl_create_example.cmake
parent797616841caaf3322c79c15b1d9c74d03b54ea12 (diff)
Generate FL/fl_config.h rather than FL/abi-version.h
... 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
Diffstat (limited to 'CMake/fl_create_example.cmake')
-rw-r--r--CMake/fl_create_example.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMake/fl_create_example.cmake b/CMake/fl_create_example.cmake
index 66c8efc58..c2db54e30 100644
--- a/CMake/fl_create_example.cmake
+++ b/CMake/fl_create_example.cmake
@@ -116,6 +116,11 @@ macro (CREATE_EXAMPLE NAME SOURCES LIBRARIES)
set_target_properties (${TARGET_NAME} PROPERTIES OUTPUT_NAME ${NAME})
target_link_libraries (${TARGET_NAME} ${LIBRARIES})
+ # we must link all programs with fltk_cairo if option CAIROEXT is enabled
+ if (FLTK_HAVE_CAIROEXT)
+ target_link_libraries (${TARGET_NAME} fltk_cairo cairo)
+ endif ()
+
if (FLTK_HAVE_CAIRO)
fl_target_link_directories (${TARGET_NAME} PRIVATE "${PKG_CAIRO_LIBRARY_DIRS}")
endif ()