summary refs log tree commit diff
path: root/pkgs/applications/misc/keepassx/darwin.patch
blob: 85fc49e363658cb289c5dd65188b4179988418cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Remove the use of macdeployqt to avoid copying dependencies and
reduce installation size from 90 MB to 9 MB.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -188,8 +188,8 @@ else()
   set(PROGNAME keepassxc)
 endif()
 
-if(APPLE AND WITH_APP_BUNDLE AND "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
-  set(CMAKE_INSTALL_PREFIX "/Applications")
+if(APPLE AND WITH_APP_BUNDLE)
+  set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/Applications")
 endif()
 
 if(MINGW)
@@ -198,7 +198,7 @@ if(MINGW)
   set(PLUGIN_INSTALL_DIR ".")
   set(DATA_INSTALL_DIR   "share")
 elseif(APPLE AND WITH_APP_BUNDLE)
-  set(CLI_INSTALL_DIR    "/usr/local/bin")
+  set(CLI_INSTALL_DIR    "../bin")
   set(BIN_INSTALL_DIR    ".")
   set(PLUGIN_INSTALL_DIR "${PROGNAME}.app/Contents/PlugIns")
   set(DATA_INSTALL_DIR   "${PROGNAME}.app/Contents/Resources")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5255186..0175983 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -282,11 +282,6 @@ if(APPLE AND WITH_APP_BUNDLE)
   if(NOT DEFINED QT_BINARY_DIR)
     set(QT_BINARY_DIR "/usr/local/opt/qt5/bin" CACHE PATH "QT binary folder")
   endif()
-  add_custom_command(TARGET ${PROGNAME}
-                     POST_BUILD
-                     COMMAND ${QT_BINARY_DIR}/macdeployqt ${PROGNAME}.app
-                     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
-                     COMMENT "Deploying app bundle")
 endif()
 
 if(MINGW)
diff --git a/src/autotype/mac/CMakeLists.txt b/src/autotype/mac/CMakeLists.txt
index ac93de0..03d502e 100644
--- a/src/autotype/mac/CMakeLists.txt
+++ b/src/autotype/mac/CMakeLists.txt
@@ -16,7 +16,6 @@ if(WITH_APP_BUNDLE)
   add_custom_command(TARGET keepassx-autotype-cocoa
                      POST_BUILD
                      COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libkeepassx-autotype-cocoa.so ${PLUGIN_INSTALL_DIR}
-                     COMMAND ${QT_BINARY_DIR}/macdeployqt ${PROGNAME}.app -executable=${PLUGIN_INSTALL_DIR}/libkeepassx-autotype-cocoa.so -no-plugins
                      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
   COMMENT "Deploying autotype plugin")
 else()