From 0015e64671a3c96a3600c23fa62935f981f78a1e Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Wed, 22 Jul 2020 23:36:20 +0200 Subject: 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. --- test/CMakeLists.txt | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'test') 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)) -- cgit v1.2.3