From 667526ad9b9bd552eec09df54f1295e2b6b5dcb1 Mon Sep 17 00:00:00 2001 From: Hannes Matuschek Date: Sun, 24 Apr 2022 09:46:31 +0200 Subject: [PATCH] Allow for app bundle destination to be specified. --- CMakeLists.txt | 1 + src/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 85904d6a..477b1d77 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ option(BUILD_DOCS "Build API documentation" OFF) option(BUILD_MAN "Build man page for dmrconf" OFF) option(INSTALL_UDEV_RULES "Install udev rules file." ON) option(INSTALL_BUNDLE "Installs QDMR as an AppBundle under MacOS X" OFF) +option(BUNDLE_PATH "Where to install the MacOS X application bundle." "~/Applications") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e3d8b22f..a99a1131 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -59,8 +59,8 @@ target_include_directories(qdmr PUBLIC "${CMAKE_CURRENT_BINARY_DIR}") # Install binary only if not a bundle under MacOS X if (UNIX AND APPLE AND INSTALL_BUNDLE) install(TARGETS qdmr - BUNDLE DESTINATION /Applications/ - RESOURCE DESTINATION "/Applications/${CMAKE_PROJECT_NAME}.app/Contents/Resources") + BUNDLE DESTINATION ${BUNDLE_PATH}/ + RESOURCE DESTINATION "${BUNDLE_PATH}/${CMAKE_PROJECT_NAME}.app/Contents/Resources") else() install(TARGETS qdmr DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}) endif(UNIX AND APPLE AND INSTALL_BUNDLE)