From ca7c59d31397c542e532fee84d04aea8cf2253af Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Mon, 21 May 2012 17:55:09 +0200 Subject: [PATCH] Fix data path on Mac OS. --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 2 +- src/core/DataPath.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d9b7b4ad3..67f479fec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,7 +114,7 @@ if(MINGW) set(DATA_INSTALL_DIR "share") elseif(APPLE) set(BIN_INSTALL_DIR "") - set(DATA_INSTALL_DIR "Contents/Resources") + set(DATA_INSTALL_DIR "${PROGNAME}.app/Contents/Resources") else(MINGW) set(BIN_INSTALL_DIR "bin") set(DATA_INSTALL_DIR "share/keepassx") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e41f3946a..c778c685d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -147,5 +147,5 @@ add_library( keepassx_core STATIC ${keepassx_SOURCES} ) add_executable( ${PROGNAME} WIN32 MACOSX_BUNDLE main.cpp ) target_link_libraries( ${PROGNAME} keepassx_core ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${GCRYPT_LIBRARIES} ${ZLIB_LIBRARIES} ) install(TARGETS ${PROGNAME} - BUNDLE DESTINATION . + BUNDLE DESTINATION . COMPONENT Runtime RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT Runtime) diff --git a/src/core/DataPath.cpp b/src/core/DataPath.cpp index 31bf35f81..1186bc000 100644 --- a/src/core/DataPath.cpp +++ b/src/core/DataPath.cpp @@ -68,7 +68,7 @@ DataPath::DataPath() } #endif #ifdef Q_WS_MAC - else if (testSetDir(QCoreApplication::applicationDirPath() + "/../Resources/keepassx")) { + else if (testSetDir(QCoreApplication::applicationDirPath() + "/../Resources")) { } #endif #ifdef Q_WS_WIN