summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorMatthias Melcher <git@matthiasm.com>2022-01-01 13:53:21 +0100
committerMatthias Melcher <github@matthiasm.com>2022-01-01 13:58:44 +0100
commit14ae784f7fe08b8c051e2109a8325b671a8e1b23 (patch)
treeb68e2385ed3173ed8849cdd08567380d9cc89e01 /fluid
parenteeb3e92eb29c4fdbcdc0b0276753c1d32210a8e5 (diff)
Installing Fluid correctly on macOS
Diffstat (limited to 'fluid')
-rw-r--r--fluid/CMakeLists.txt18
1 files changed, 15 insertions, 3 deletions
diff --git a/fluid/CMakeLists.txt b/fluid/CMakeLists.txt
index 4dc71ac68..f25e0ab2e 100644
--- a/fluid/CMakeLists.txt
+++ b/fluid/CMakeLists.txt
@@ -124,12 +124,24 @@ endif (USE_GDIPLUS)
# install fluid
if (APPLE AND (NOT OPTION_APPLE_X11) AND (NOT OPTION_APPLE_SDL))
+
+ # On macOS, Fluid must be installed twice. The bundled version of Fluid needs
+ # to go into the /Applications folder to make it visible as a user App with
+ # full GUI. The binary without bundle should go into ${FLTK_BINDIR}, usually
+ # /usr/local/bin, so it will be picked up as a command line tool by
+ # the build process of other apps.
+
# create bundle
set_target_properties (fluid PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/fluid.plist")
set_target_properties (fluid PROPERTIES MACOSX_BUNDLE_ICON_FILE ${ICON_NAME})
- set_target_properties (fluid PROPERTIES RESOURCE ${ICON_PATH})
- # install
- install (TARGETS fluid DESTINATION ${FLTK_BINDIR})
+ # The line below would wrongly install /Applications/fluid.icns
+ #set_target_properties (fluid PROPERTIES RESOURCE ${ICON_PATH})
+ # install GUI tool
+ install (TARGETS fluid DESTINATION "/Applications")
+
+ # install command line tool
+ install (PROGRAMS $<TARGET_FILE:fluid> DESTINATION ${FLTK_BINDIR} )
+
else()
install (TARGETS fluid
EXPORT FLTK-Targets