diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-07-20 11:02:01 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-07-20 11:02:01 +0200 |
| commit | 4858882e1e4af51cbe7125752f83216c273eed7c (patch) | |
| tree | ce70fc4782b832b72458ff5ce4b32a76b5097910 /test | |
| parent | df683013d289dcc47d31506035a9a56c37abcfeb (diff) | |
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)
Diffstat (limited to 'test')
| -rw-r--r-- | test/CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
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)) |
