kwin/autotests/tabbox/CMakeLists.txt
Vlad Zahorodnii 93e0265e4e Move source code to src/ directory
Once in a while, we receive complaints from other fellow KDE developers
about the file organization of kwin. This change addresses some of those
complaints by moving all of source code in a separate directory, src/,
thus making the project structure more traditional. Things such as tests
are kept in their own toplevel directories.

This change may wreak havoc on merge requests that add new files to kwin,
but if a patch modifies an already existing file, git should be smart
enough to figure out that the file has been relocated.

We may potentially split the src/ directory further to make navigating
the source code easier, but hopefully this is good enough already.
2021-02-10 15:31:43 +00:00

102 lines
2.9 KiB
CMake

include_directories(${KWin_SOURCE_DIR}/src)
add_definitions(-DKWIN_UNIT_TEST)
########################################################
# Test TabBox::ClientModel
########################################################
set(testTabBoxClientModel_SRCS
../../src/tabbox/clientmodel.cpp
../../src/tabbox/desktopmodel.cpp
../../src/tabbox/tabbox_logging.cpp
../../src/tabbox/tabboxconfig.cpp
../../src/tabbox/tabboxhandler.cpp
mock_tabboxclient.cpp
mock_tabboxhandler.cpp
test_tabbox_clientmodel.cpp
)
add_executable(testTabBoxClientModel ${testTabBoxClientModel_SRCS})
set_target_properties(testTabBoxClientModel PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
target_link_libraries(testTabBoxClientModel
Qt::Core
Qt::DBus
Qt::Quick
Qt::Script
Qt::Test
Qt::Widgets
Qt::X11Extras
Qt::GuiPrivate
KF5::ConfigCore
KF5::I18n
KF5::Package
KF5::WindowSystem
XCB::XCB
)
add_test(NAME kwin-testTabBoxClientModel COMMAND testTabBoxClientModel)
ecm_mark_as_test(testTabBoxClientModel)
########################################################
# Test TabBox::TabBoxHandler
########################################################
set(testTabBoxHandler_SRCS
../../src/tabbox/clientmodel.cpp
../../src/tabbox/desktopmodel.cpp
../../src/tabbox/tabbox_logging.cpp
../../src/tabbox/tabboxconfig.cpp
../../src/tabbox/tabboxhandler.cpp
mock_tabboxclient.cpp
mock_tabboxhandler.cpp
test_tabbox_handler.cpp
)
add_executable(testTabBoxHandler ${testTabBoxHandler_SRCS})
set_target_properties(testTabBoxHandler PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
target_link_libraries(testTabBoxHandler
Qt::Core
Qt::DBus
Qt::Quick
Qt::Script
Qt::Test
Qt::Widgets
Qt::X11Extras
Qt::GuiPrivate
KF5::ConfigCore
KF5::I18n
KF5::Package
KF5::WindowSystem
XCB::XCB
)
add_test(NAME kwin-testTabBoxHandler COMMAND testTabBoxHandler)
ecm_mark_as_test(testTabBoxHandler)
########################################################
# Test TabBox::TabBoxConfig
########################################################
set(testTabBoxConfig_SRCS
../../src/tabbox/tabbox_logging.cpp
../../src/tabbox/tabboxconfig.cpp
test_tabbox_config.cpp
)
add_executable(testTabBoxConfig ${testTabBoxConfig_SRCS})
target_link_libraries(testTabBoxConfig Qt::Core Qt::Test)
add_test(NAME kwin-testTabBoxConfig COMMAND testTabBoxConfig)
ecm_mark_as_test(testTabBoxConfig)
########################################################
# Test TabBox::DesktopChainManager
########################################################
set(testDesktopChain_SRCS
../../src/tabbox/desktopchain.cpp
../../src/tabbox/tabbox_logging.cpp
test_desktopchain.cpp
)
add_executable(testDesktopChain ${testDesktopChain_SRCS})
target_link_libraries(testDesktopChain Qt::Core Qt::Test)
add_test(NAME kwin-testDesktopChain COMMAND testDesktopChain)
ecm_mark_as_test(testDesktopChain)