Copy PlasmaCore binary qmldir file structure into bin for unit tests

This way tests pass before installation.

Test Plan:
Before patch

Created a broken env by unsetting QML2_IMPORT_PATH
Ran test. It failed

It passes.

Reviewers: #plasma, dfaure

Reviewed By: dfaure

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D14743
This commit is contained in:
David Edmundson 2018-08-13 22:42:14 +02:00
parent bcbef6de4d
commit 0ae178016a

View File

@ -69,3 +69,16 @@ install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/core)
install(FILES private/DefaultToolTip.qml DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/core/private)
ecm_generate_qmltypes(org.kde.plasma.core 2.0 DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/core)
#also "install" to $BUILD_DIR/bin for unit tests
add_custom_target(copy ALL DEPENDS corebindingsplugin)
add_custom_command(TARGET copy POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy ${CMAKE_CURRENT_SOURCE_DIR}/qmldir ${CMAKE_BINARY_DIR}/bin/org/kde/plasma/core/qmldir)
add_custom_command(TARGET copy POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy $<TARGET_FILE:corebindingsplugin> ${CMAKE_BINARY_DIR}/bin/org/kde/plasma/core/)
add_custom_command(TARGET copy POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy ${CMAKE_CURRENT_SOURCE_DIR}/private/DefaultToolTip.qml ${CMAKE_BINARY_DIR}/bin/org/kde/plasma/core/private/DefaultToolTip.qml)