diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-07-22 23:36:20 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-07-22 23:36:20 +0200 |
| commit | 0015e64671a3c96a3600c23fa62935f981f78a1e (patch) | |
| tree | ccc07771de7121b976898179fc8c42f2eda9521a | |
| parent | b2ad5e4cfd224254cb48190708802d52c71c6b5c (diff) | |
macOS: don't add resource files to demo.app
Resources like demo.menu and help_dialog.html are no longer read
from the bundle directory on macOS. They are read from the build
folder build/data or in case of classic autoconf/make builds from
the source directory. We don't need to copy the files into the
bundle folder, they are copied to the build/data folder on all
platforms anyway.
| -rw-r--r-- | test/CMakeLists.txt | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b477d6647..d7ad60750 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -209,6 +209,7 @@ endif (NOT ANDROID) # - demo.menu: help_dialog (help_dialog.html) can't find its images (not copied) # create data directory for test and demo programs if it doesn't exist + file (MAKE_DIRECTORY ${TESTFILE_PATH}) # copy the test files @@ -223,22 +224,3 @@ file (COPY target_compile_definitions (demo PRIVATE GENERATED_BY_CMAKE) target_compile_definitions (demo PRIVATE CMAKE_SOURCE_PATH="${CMAKE_CURRENT_SOURCE_DIR}") - -# 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) AND (NOT OPTION_APPLE_SDL)) - - # make the menu structure part of the app - target_sources (demo PRIVATE demo.menu) - set_target_properties (demo PROPERTIES MACOSX_BUNDLE TRUE RESOURCE demo.menu) - - # add a sample RGB file that otherwise only exists under X11 - target_sources (colbrowser PRIVATE rgb.txt) - set_target_properties (colbrowser PROPERTIES MACOSX_BUNDLE TRUE RESOURCE rgb.txt) - - # help_dialog displays an html file as an example - 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) AND (NOT OPTION_APPLE_SDL)) |
