--- CMakeLists.txt.orig 2017-10-27 09:26:34.049479661 +0200
+++ CMakeLists.txt 2017-10-27 09:33:54.593519368 +0200
@@ -58,6 +58,7 @@
find_library(SYSTEM_IDN_FOUND idn)
find_library(SYSTEM_MINIZIP_FOUND minizip)
find_library(SYSTEM_QTLOCKEDFILE_FOUND Qt5Solutions_LockedFile-2.4)
+find_library(SYSTEM_QXTGLOBALSHORTCUT_FOUND qxtglobalshortcut)
if (FORCE_BUNDLED_MINIZIP)
set(SYSTEM_MINIZIP_FOUND NO)
@@ -85,6 +86,10 @@
add_definitions(-DUSE_SYSTEM_QTLOCKEDFILE)
endif (SYSTEM_QTLOCKEDFILE_FOUND)
+if (SYSTEM_QXTGLOBALSHORTCUT_FOUND)
+ add_definitions(-DUSE_SYSTEM_QXTGLOBALSHORTCUT)
+endif (SYSTEM_QXTGLOBALSHORTCUT_FOUND)
+
if ("${LANGS}" STREQUAL "")
process_lang_options()
else ("${LANGS}" STREQUAL "")
--- src/utils/shortcuts.cpp.orig 2017-10-27 10:12:59.889730754 +0200
+++ src/utils/shortcuts.cpp 2017-10-27 10:14:49.231740609 +0200
@@ -5,7 +5,12 @@
#include <QVariant>
#include <QApplication>
#include <QDesktopWidget>
-#include <thirdparty/qxtglobalshortcut/qxtglobalshortcut.h>
+
+#ifdef USE_SYSTEM_QXTGLOBALSHORTCUT
+# include <qxtglobalshortcut/qxtglobalshortcut.h>
+#else
+# include <thirdparty/qxtglobalshortcut/qxtglobalshortcut.h>
+#endif
QKeySequence correctKeySequence(const QKeySequence &AKey)
{
--- src/utils/CMakeLists.txt.orig 2017-10-27 11:28:03.126136638 +0200
+++ src/utils/CMakeLists.txt 2017-10-27 11:30:48.574151551 +0200
@@ -9,10 +9,9 @@
project(${VACUUM_UTILS_NAME})
add_definitions("-DUTILS_DLL")
-add_definitions("-DQXT_STATIC")
link_directories("${CMAKE_BINARY_DIR}/libs")
-set(ADD_LIBS qxtglobalshortcut idle)
+set(ADD_LIBS idle)
add_translations(TRANSLATIONS "${VACUUM_UTILS_NAME}" ${SOURCES})
add_library(${VACUUM_UTILS_NAME} SHARED ${SOURCES} ${MOC_SOURCES} ${TRANSLATIONS})
@@ -52,6 +51,12 @@
list(APPEND ADD_LIBS minizip)
endif (SYSTEM_MINIZIP_FOUND)
+if (SYSTEM_QXTGLOBALSHORTCUT_FOUND)
+ list(APPEND ADD_LIBS "${SYSTEM_QXTGLOBALSHORTCUT_FOUND}")
+else (SYSTEM_QXTGLOBALSHORTCUT_FOUND)
+ list(APPEND ADD_LIBS qxtglobalshortcut)
+endif (SYSTEM_QXTGLOBALSHORTCUT_FOUND)
+
if (APPLE)
list(APPEND ADD_LIBS "-framework Carbon -framework IOKit -framework Cocoa")
endif (APPLE)
--- src/thirdparty/CMakeLists.txt.orig 2017-10-27 13:03:13.351071909 +0200
+++ src/thirdparty/CMakeLists.txt 2017-10-27 13:04:31.895078988 +0200
@@ -14,5 +14,8 @@
add_subdirectory(qtlockedfile)
endif (NOT SYSTEM_QTLOCKEDFILE_FOUND)
+if (NOT SYSTEM_QXTGLOBALSHORTCUT_FOUND)
+ add_subdirectory(qxtglobalshortcut)
+endif (NOT SYSTEM_QXTGLOBALSHORTCUT_FOUND)
+
add_subdirectory(idle)
-add_subdirectory(qxtglobalshortcut)