Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 54b69bec authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

Honor BUILD_TESTING

Test Plan:
* Passed `BUILD_TESTING=OFF` option to cmake, no tests have been built;
* Didn't pass `BUILD_TESTING` option, all tests have been built.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13163
parent 99532fb9
......@@ -690,10 +690,13 @@ ecm_install_icons(
)
add_subdirectory(qml)
add_subdirectory(autotests)
add_subdirectory(tests)
add_subdirectory(packageplugins)
if (BUILD_TESTING)
add_subdirectory(autotests)
add_subdirectory(tests)
endif()
if (KF5DocTools_FOUND)
add_subdirectory(doc)
endif()
......
......@@ -9,8 +9,6 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_STRICT_ITERATORS -DQT_NO_CAST_FR
include_directories(${KWIN_SOURCE_DIR}/effects)
include(ECMMarkAsTest)
################# configure checks and create the configured files #################
# now create config headers
......@@ -47,38 +45,41 @@ target_link_libraries(kwincompositing
kwin4_effect_builtins
)
set(modelTest_SRC
model.cpp
effectconfig.cpp
compositing.cpp
test/effectmodeltest.cpp
test/modeltest.cpp)
qt5_add_dbus_interface( modelTest_SRC
${KWIN_SOURCE_DIR}/org.kde.kwin.Compositing.xml kwin_compositing_interface)
qt5_add_dbus_interface( modelTest_SRC
${KWIN_SOURCE_DIR}/org.kde.kwin.Effects.xml kwin_effects_interface)
add_executable(effectModelTest ${modelTest_SRC})
ecm_mark_as_test(effectModelTest)
target_link_libraries(effectModelTest
Qt5::Quick
Qt5::QuickWidgets
Qt5::DBus
Qt5::Test
Qt5::Widgets
KF5::CoreAddons
KF5::ConfigCore
KF5::Declarative
KF5::I18n
KF5::Service
KF5::KCMUtils
KF5::NewStuff
kwineffects
kwin4_effect_builtins
)
if (BUILD_TESTING)
include(ECMMarkAsTest)
set(modelTest_SRC
model.cpp
effectconfig.cpp
compositing.cpp
test/effectmodeltest.cpp
test/modeltest.cpp)
qt5_add_dbus_interface(modelTest_SRC
${KWIN_SOURCE_DIR}/org.kde.kwin.Compositing.xml kwin_compositing_interface)
qt5_add_dbus_interface(modelTest_SRC
${KWIN_SOURCE_DIR}/org.kde.kwin.Effects.xml kwin_effects_interface)
add_executable(effectModelTest ${modelTest_SRC})
ecm_mark_as_test(effectModelTest)
target_link_libraries(effectModelTest
Qt5::Quick
Qt5::QuickWidgets
Qt5::DBus
Qt5::Test
Qt5::Widgets
KF5::CoreAddons
KF5::ConfigCore
KF5::Declarative
KF5::I18n
KF5::Service
KF5::KCMUtils
KF5::NewStuff
kwineffects
kwin4_effect_builtins
)
endif()
INSTALL(DIRECTORY qml DESTINATION ${DATA_INSTALL_DIR}/kwincompositing)
INSTALL(TARGETS kwincompositing DESTINATION ${PLUGIN_INSTALL_DIR})
......
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