Commit 9af78c0e authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

cmake: Rework how activities support is compiled into libkwin

In modern CMake code, it is highly advised to avoid using variables. One
should instead try to use targets and properties more extensively.
parent d16c1530
......@@ -575,12 +575,6 @@ if (KWIN_BUILD_TABBOX)
)
endif()
if (KWIN_BUILD_ACTIVITIES)
set(kwin_SRCS ${kwin_SRCS}
activities.cpp
)
endif()
if (HAVE_LINUX_VT_H)
set(kwin_SRCS ${kwin_SRCS}
virtual_terminal.cpp
......@@ -681,10 +675,6 @@ set(kwin_WAYLAND_LIBS
${CMAKE_THREAD_LIBS_INIT}
)
if (KWIN_BUILD_ACTIVITIES)
set(kwin_KDE_LIBS ${kwin_KDE_LIBS} KF5::Activities)
endif()
set(kwinLibs
${kwin_OWN_LIBS}
${kwin_QT_LIBS}
......@@ -716,6 +706,11 @@ if (KWIN_BUILD_CMS)
target_link_libraries(kwin lcms2::lcms2)
endif()
if (KWIN_BUILD_ACTIVITIES)
target_sources(kwin PRIVATE activities.cpp)
target_link_libraries(kwin KF5::Activities)
endif()
generate_export_header(kwin EXPORT_FILE_NAME kwin_export.h)
if(CMAKE_SYSTEM MATCHES "FreeBSD")
......
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