Commit ae6bf629 authored by Michael Abrahams's avatar Michael Abrahams

Fix CMake: cannot build `colord` without D-Bus

We were not blocking the `colord` properly or even really checking for
D-Bus correctly.
parent 12d763b4
...@@ -18,7 +18,7 @@ if (NOT ${CMAKE_VERSION} VERSION_LESS 2.8.12) ...@@ -18,7 +18,7 @@ if (NOT ${CMAKE_VERSION} VERSION_LESS 2.8.12)
endif () endif ()
if (NOT ${CMAKE_VERSION} VERSION_LESS 3.0.0) if (NOT ${CMAKE_VERSION} VERSION_LESS 3.0.0)
cmake_policy(SET CMP0026 OLD) cmake_policy(SET CMP0026 OLD)
cmake_policy(SET CMP0046 OLD) cmake_policy(SET CMP0046 OLD)
endif () endif ()
...@@ -196,36 +196,37 @@ include(KDE4Macros) ...@@ -196,36 +196,37 @@ include(KDE4Macros)
# do not reorder to be alphabetical: this is the order in which the frameworks # do not reorder to be alphabetical: this is the order in which the frameworks
# depend on each other. # depend on each other.
find_package(KF5 ${MIN_FRAMEWORKS_VERSION} REQUIRED find_package(KF5 ${MIN_FRAMEWORKS_VERSION} REQUIRED COMPONENTS
Archive Archive
Config Config
WidgetsAddons WidgetsAddons
Completion Completion
CoreAddons CoreAddons
GuiAddons GuiAddons
I18n I18n
ItemModels ItemModels
ItemViews ItemViews
WindowSystem WindowSystem
) )
find_package(KF5KIO ${MIN_QT_VERSION}) find_package(KF5KIO ${MIN_QT_VERSION})
find_package(Qt5 ${MIN_QT_VERSION} REQUIRED find_package(Qt5 ${MIN_QT_VERSION}
Core REQUIRED COMPONENTS
Gui Core
Widgets Gui
Xml Widgets
Network Xml
Network
PrintSupport PrintSupport
Svg Svg
Test Test
Concurrent Concurrent
OPTIONAL_COMPONENTS
DBus
Quick
) )
find_package(Qt5Quick ${MIN_QT_VERSION})
find_package(Qt5Dbus ${MIN_QT_VERSION})
set(HAVE_DBUS ${Qt5DBus_FOUND}) set(HAVE_DBUS ${Qt5DBus_FOUND})
set(QT_QTTEST_LIBRARY Qt5::Test) set(QT_QTTEST_LIBRARY Qt5::Test)
if (USEOPENGL) if (USEOPENGL)
...@@ -525,8 +526,8 @@ include(MacroCalligraAddTest) ...@@ -525,8 +526,8 @@ include(MacroCalligraAddTest)
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/interfaces ) include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/interfaces )
set(KOVERSION_INCLUDES ${CMAKE_SOURCE_DIR}/libs/version set(KOVERSION_INCLUDES ${CMAKE_SOURCE_DIR}/libs/version
${CMAKE_BINARY_DIR}/libs/version ${CMAKE_BINARY_DIR}/libs/version
) )
include_directories(${KOVERSION_INCLUDES}) include_directories(${KOVERSION_INCLUDES})
...@@ -546,18 +547,18 @@ set(KOODF_INCLUDES ${CMAKE_SOURCE_DIR}/libs/odf ...@@ -546,18 +547,18 @@ set(KOODF_INCLUDES ${CMAKE_SOURCE_DIR}/libs/odf
${CMAKE_SOURCE_DIR}/libs/store ${CMAKE_SOURCE_DIR}/libs/store
${CMAKE_BINARY_DIR}/libs/odf ${CMAKE_BINARY_DIR}/libs/odf
${CMAKE_BINARY_DIR}/libs/store ${CMAKE_BINARY_DIR}/libs/store
${KOVERSION_INCLUDES} ${KOVERSION_INCLUDES}
) )
# pigment depends on koplugin and lcms # pigment depends on koplugin and lcms
set(PIGMENT_INCLUDES ${KOPLUGIN_INCLUDES} set(PIGMENT_INCLUDES ${KOPLUGIN_INCLUDES}
${KOVERSION_INCLUDES} ${KOVERSION_INCLUDES}
${CMAKE_SOURCE_DIR}/libs/pigment ${CMAKE_SOURCE_DIR}/libs/pigment
${CMAKE_BINARY_DIR}/libs/pigment ${CMAKE_BINARY_DIR}/libs/pigment
${CMAKE_SOURCE_DIR}/libs/pigment/compositeops ${CMAKE_SOURCE_DIR}/libs/pigment/compositeops
${CMAKE_SOURCE_DIR}/libs/pigment/resources ${CMAKE_SOURCE_DIR}/libs/pigment/resources
${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
) )
# flake depends on koodf and pigment # flake depends on koodf and pigment
......
if (UNIX AND NOT APPLE) if (UNIX AND NOT APPLE AND HAVE_DBUS)
add_subdirectory(colord) add_subdirectory(colord)
set(kritacolor_LIB_SRCS kis_color_manager.h linux/kis_color_manager.cpp) set(kritacolor_LIB_SRCS kis_color_manager.h linux/kis_color_manager.cpp)
set(kritacolor_EXTRA_LIBRARIES kritacolord) set(kritacolor_EXTRA_LIBRARIES kritacolord)
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <QFileInfo> #include <QFileInfo>
#include <QDebug> #include <QDebug>
#include <QSet> #include <QSet>
#include <QApplication>
Q_GLOBAL_STATIC(KoResourcePaths, s_instance); Q_GLOBAL_STATIC(KoResourcePaths, s_instance);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment