From 4858882e1e4af51cbe7125752f83216c273eed7c Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 20 Jul 2020 11:02:01 +0200 Subject: CMake: simplify create_example macro - move target (demo) specific code from macro to CMakeLists.txt - refactor macOS specific code for a cleaner structure - improve documentation Note: CMake ignores platform specific code like creating bundles on other platforms, hence the entire code could be simplified (less conditional code) --- test/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 55a22f175..e6387ad79 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -216,7 +216,10 @@ file (COPY # Apple macOS creates bundles instead of executables and needs a little bit # more help for demos to run correctly -if (APPLE AND NOT OPTION_APPLE_X11) + +if (APPLE AND (NOT OPTION_APPLE_X11) AND (NOT OPTION_APPLE_SDL)) + + target_compile_definitions (demo PUBLIC USING_XCODE) # make the menu structure part of the app target_sources (demo PRIVATE demo.menu) @@ -230,4 +233,4 @@ if (APPLE AND NOT OPTION_APPLE_X11) target_sources (help_dialog PRIVATE help_dialog.html) set_target_properties (help_dialog PROPERTIES MACOSX_BUNDLE TRUE RESOURCE help_dialog.html) -endif (APPLE AND NOT OPTION_APPLE_X11) +endif (APPLE AND (NOT OPTION_APPLE_X11) AND (NOT OPTION_APPLE_SDL)) -- cgit v1.2.3