From 007e37d8973c543004a41ff1d7385b0cfd6ffd4c Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 21 Dec 2023 19:13:49 +0100 Subject: 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. --- CMake/fl_create_example.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CMake/fl_create_example.cmake') 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}) -- cgit v1.2.3