diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-08-18 16:23:25 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-08-18 16:23:25 +0200 |
| commit | fcd5239adc468b58a130356be79e6e741689e6b0 (patch) | |
| tree | 3e89583169757e8cbfb095b453e4972c2caeef28 /fluid | |
| parent | b8b280527041710b69e7dd18d721089698abb227 (diff) | |
CMake: Fix macOS bundle wrapper generation
Now bundle wrapper scripts are created in the particular build folder,
i.e. in subdir 'Debug', 'Release' etc. in multi config builds (Xcode).
To do this, the scripts are now copied whenever the target is built
and not during the configuration phase.
To do: "install" wrapper scripts.
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/CMakeLists.txt | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/fluid/CMakeLists.txt b/fluid/CMakeLists.txt index 30b105891..cbe04353a 100644 --- a/fluid/CMakeLists.txt +++ b/fluid/CMakeLists.txt @@ -49,9 +49,23 @@ endif (WIN32) if (APPLE AND (NOT OPTION_APPLE_X11) AND (NOT OPTION_APPLE_SDL)) set (ICON_NAME fluid.icns) set (ICON_PATH "${PROJECT_SOURCE_DIR}/fluid/fluid.app/Contents/Resources/${ICON_NAME}") - add_executable(fluid MACOSX_BUNDLE ${CPPFILES} ${ICON_PATH}) + add_executable (fluid MACOSX_BUNDLE ${CPPFILES} ${ICON_PATH}) + + # create macOS bundle wrapper script + + set (WRAPPER "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/fluid") + add_custom_command ( + TARGET fluid POST_BUILD + COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/../CMake/macOS-bundle-wrapper.in ${WRAPPER} + COMMAND chmod u+x,g+x,o+x ${WRAPPER} + BYPRODUCTS ${WRAPPER} + # COMMENT "Creating macOS bundle wrapper script ${WRAPPER}" + VERBATIM + ) + unset (WRAPPER) + else () - add_executable(fluid WIN32 ${CPPFILES}) + add_executable (fluid WIN32 ${CPPFILES}) endif (APPLE AND (NOT OPTION_APPLE_X11) AND (NOT OPTION_APPLE_SDL)) target_link_libraries(fluid fltk fltk_images fltk_forms) |
