aboutsummaryrefslogtreecommitdiff
path: root/qdeduper/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'qdeduper/CMakeLists.txt')
-rw-r--r--qdeduper/CMakeLists.txt15
1 files changed, 13 insertions, 2 deletions
diff --git a/qdeduper/CMakeLists.txt b/qdeduper/CMakeLists.txt
index 7373331..3adc4ba 100644
--- a/qdeduper/CMakeLists.txt
+++ b/qdeduper/CMakeLists.txt
@@ -3,9 +3,13 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
option(QDEDUPER_USE_QT6 "Build qdeduper with Qt 6" OFF)
if (QDEDUPER_USE_QT6)
- find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent)
+ find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent OPTIONAL_COMPONENTS DBus)
else()
- find_package(Qt5 REQUIRED COMPONENTS Widgets Concurrent)
+ find_package(Qt5 REQUIRED COMPONENTS Widgets Concurrent OPTIONAL_COMPONENTS DBus)
+endif()
+
+if (Qt5DBus_FOUND OR Qt6DBus_FOUND)
+ add_compile_definitions(HAS_QTDBUS)
endif()
set(CMAKE_AUTOMOC ON)
@@ -21,6 +25,7 @@ add_executable(qdeduper
pathchooser.cpp
settings.cpp
preferencedialog.cpp
+ utilities.cpp
resources.qrc
)
@@ -30,6 +35,12 @@ target_link_libraries(qdeduper
if (QDEDUPER_USE_QT6)
target_link_libraries(qdeduper Qt6::Widgets Qt6::Concurrent)
+ if(Qt6DBus_FOUND)
+ target_link_libraries(qdeduper Qt6::DBus)
+ endif()
else()
target_link_libraries(qdeduper Qt5::Widgets Qt5::Concurrent)
+ if(Qt5DBus_FOUND)
+ target_link_libraries(qdeduper Qt5::DBus)
+ endif()
endif()