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.
This commit is contained in:
parent
d16c15301f
commit
9af78c0e7f
1 changed files with 5 additions and 10 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue