diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-12-21 19:13:49 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-12-21 19:13:49 +0100 |
| commit | 007e37d8973c543004a41ff1d7385b0cfd6ffd4c (patch) | |
| tree | 45b7cd5016fdc446d3007ebf2124837cadc1a3a0 /CMake/fl_create_example.cmake | |
| parent | fcf91e51c008681f26c48b9a51a0475b509abe2c (diff) | |
Ensure that exporting 'fl_disable_wayland' works
... with cmake_minimum_required(VERSION 3.4) or higher. This version
sets CMP0065 to 'NEW' which by default inhibits exporting global
symbols from executable programs.
For details see CMake policy CMP0065 and README.Wayland.txt.
Diffstat (limited to 'CMake/fl_create_example.cmake')
| -rw-r--r-- | CMake/fl_create_example.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMake/fl_create_example.cmake b/CMake/fl_create_example.cmake index 6ea1ff141..be1b27608 100644 --- a/CMake/fl_create_example.cmake +++ b/CMake/fl_create_example.cmake @@ -119,6 +119,11 @@ function (CREATE_EXAMPLE NAME SOURCES LIBRARIES) set_target_properties (${TARGET_NAME} PROPERTIES OUTPUT_NAME ${NAME}) target_link_libraries (${TARGET_NAME} ${LIBRARIES}) + # make sure we're "exporting" global symbols like 'fl_disable_wayland', + # see also README.Wayland.txt and CMake policy CMP0065. + + set_target_properties (${TARGET_NAME} PROPERTIES ENABLE_EXPORTS TRUE) + # we must link all programs with cairo if option CAIROEXT is enabled if (FLTK_HAVE_CAIROEXT) target_link_libraries (${TARGET_NAME} ${PKG_CAIRO_LIBRARIES}) |
