Make lcms2 a hard dependency
When we do more color management stuff we'll need it in more places, making it a hard requirement reduces the amount of needed ifdefs and should make adding color management features a little simpler.
This commit is contained in:
parent
871f8d0b91
commit
f6eee463ba
6 changed files with 8 additions and 28 deletions
|
@ -237,9 +237,9 @@ find_package(lcms2)
|
|||
set_package_properties(lcms2 PROPERTIES
|
||||
DESCRIPTION "Small-footprint color management engine"
|
||||
URL "http://www.littlecms.com"
|
||||
TYPE OPTIONAL
|
||||
TYPE REQUIRED
|
||||
PURPOSE "Required for the color management system"
|
||||
)
|
||||
add_feature_info("lcms2" lcms2_FOUND "Required for the color management system")
|
||||
|
||||
# All the required XCB components
|
||||
find_package(XCB 1.10 REQUIRED COMPONENTS
|
||||
|
@ -345,7 +345,6 @@ option(KWIN_BUILD_SCREENLOCKER "Enable building of KWin lockscreen functionality
|
|||
option(KWIN_BUILD_TABBOX "Enable building of KWin Tabbox functionality" ON)
|
||||
cmake_dependent_option(KWIN_BUILD_ACTIVITIES "Enable building of KWin with kactivities support" ON "KF5Activities_FOUND" OFF)
|
||||
cmake_dependent_option(KWIN_BUILD_RUNNERS "Enable building of KWin with krunner support" ON "KF5Runner_FOUND" OFF)
|
||||
cmake_dependent_option(KWIN_BUILD_CMS "Enable building of KWin with CMS" ON "lcms2_FOUND" OFF)
|
||||
|
||||
# Binary name of KWin
|
||||
set(KWIN_NAME "kwin")
|
||||
|
|
|
@ -141,10 +141,7 @@ integrationTest(WAYLAND_ONLY NAME testOutputChanges SRCS outputchanges_test.cpp)
|
|||
|
||||
qt_add_dbus_interfaces(DBUS_SRCS ${CMAKE_BINARY_DIR}/src/org.kde.kwin.VirtualKeyboard.xml)
|
||||
integrationTest(WAYLAND_ONLY NAME testVirtualKeyboardDBus SRCS test_virtualkeyboard_dbus.cpp ${DBUS_SRCS})
|
||||
|
||||
if (KWIN_BUILD_CMS)
|
||||
integrationTest(WAYLAND_ONLY NAME testNightColor SRCS nightcolor_test.cpp LIBS KWinNightColorPlugin)
|
||||
endif()
|
||||
integrationTest(WAYLAND_ONLY NAME testNightColor SRCS nightcolor_test.cpp LIBS KWinNightColorPlugin)
|
||||
|
||||
if (XCB_ICCCM_FOUND)
|
||||
integrationTest(NAME testMoveResize SRCS move_resize_window_test.cpp LIBS XCB::ICCCM)
|
||||
|
|
|
@ -32,6 +32,8 @@ target_sources(kwin PRIVATE
|
|||
appmenu.cpp
|
||||
atoms.cpp
|
||||
client_machine.cpp
|
||||
colordevice.cpp
|
||||
colormanager.cpp
|
||||
composite.cpp
|
||||
cursor.cpp
|
||||
cursordelegate_opengl.cpp
|
||||
|
@ -201,6 +203,7 @@ target_link_libraries(kwin
|
|||
epoxy::epoxy
|
||||
|
||||
Threads::Threads
|
||||
lcms2::lcms2
|
||||
)
|
||||
if (QT_MAJOR_VERSION EQUAL "5")
|
||||
target_link_libraries(kwin Qt5::XkbCommonSupportPrivate)
|
||||
|
@ -245,14 +248,6 @@ add_subdirectory(backends)
|
|||
add_subdirectory(scenes)
|
||||
add_subdirectory(utils)
|
||||
|
||||
if (KWIN_BUILD_CMS)
|
||||
target_sources(kwin PRIVATE
|
||||
colordevice.cpp
|
||||
colormanager.cpp
|
||||
)
|
||||
target_link_libraries(kwin lcms2::lcms2)
|
||||
endif()
|
||||
|
||||
if (KWIN_BUILD_ACTIVITIES)
|
||||
target_sources(kwin PRIVATE activities.cpp)
|
||||
target_link_libraries(kwin KF5::Activities)
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#cmakedefine01 KWIN_BUILD_SCREENLOCKER
|
||||
#cmakedefine01 KWIN_BUILD_TABBOX
|
||||
#cmakedefine01 KWIN_BUILD_ACTIVITIES
|
||||
#cmakedefine01 KWIN_BUILD_CMS
|
||||
#define KWIN_NAME "${KWIN_NAME}"
|
||||
#define KWIN_INTERNAL_NAME_X11 "${KWIN_INTERNAL_NAME_X11}"
|
||||
#define KWIN_CONFIG "${KWIN_NAME}rc"
|
||||
|
|
|
@ -13,9 +13,7 @@
|
|||
|
||||
#include "atoms.h"
|
||||
#include "platform.h"
|
||||
#if KWIN_BUILD_CMS
|
||||
#include "colormanager.h"
|
||||
#endif
|
||||
#include "composite.h"
|
||||
#include "cursor.h"
|
||||
#include "input.h"
|
||||
|
@ -311,9 +309,7 @@ void Application::createPlugins()
|
|||
|
||||
void Application::createColorManager()
|
||||
{
|
||||
#if KWIN_BUILD_CMS
|
||||
ColorManager::create(this);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Application::createInputMethod()
|
||||
|
@ -353,9 +349,7 @@ void Application::destroyPlugins()
|
|||
|
||||
void Application::destroyColorManager()
|
||||
{
|
||||
#if KWIN_BUILD_CMS
|
||||
delete ColorManager::self();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Application::destroyInputMethod()
|
||||
|
|
|
@ -3,18 +3,14 @@ add_subdirectory(qpa)
|
|||
add_subdirectory(idletime)
|
||||
add_subdirectory(windowsystem)
|
||||
add_subdirectory(kpackage)
|
||||
if (KWIN_BUILD_CMS)
|
||||
add_subdirectory(nightcolor)
|
||||
endif()
|
||||
add_subdirectory(nightcolor)
|
||||
add_subdirectory(colord-integration)
|
||||
if (KWIN_BUILD_DECORATIONS)
|
||||
add_subdirectory(kdecorations)
|
||||
endif()
|
||||
if (PipeWire_FOUND)
|
||||
add_subdirectory(screencast)
|
||||
endif()
|
||||
if (KWIN_BUILD_CMS)
|
||||
add_subdirectory(colord-integration)
|
||||
endif()
|
||||
if (KWIN_BUILD_RUNNERS)
|
||||
add_subdirectory(krunner-integration)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue