Changeset View
Changeset View
Standalone View
Standalone View
src/qml/CMakeLists.txt
1 | set(corebindings_SRCS | 1 | set(corebindings_SRCS | ||
---|---|---|---|---|---|
2 | plugin.cpp | 2 | plugin.cpp | ||
3 | kconcatenaterowsproxymodel_qml.cpp | 3 | kconcatenaterowsproxymodel_qml.cpp | ||
4 | ) | 4 | ) | ||
5 | 5 | | |||
6 | add_library(itemmodelsplugin SHARED ${corebindings_SRCS}) | 6 | add_library(itemmodelsplugin SHARED ${corebindings_SRCS}) | ||
7 | target_link_libraries(itemmodelsplugin | 7 | target_link_libraries(itemmodelsplugin | ||
8 | Qt5::Qml | 8 | Qt5::Qml | ||
9 | KF5::ItemModels | 9 | KF5::ItemModels | ||
10 | ) | 10 | ) | ||
11 | 11 | | |||
12 | install(TARGETS itemmodelsplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kitemmodels) | 12 | install(TARGETS itemmodelsplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kitemmodels) | ||
13 | install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kitemmodels) | 13 | install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kitemmodels) | ||
14 | | ||||
15 | # Faux install into the build dir for unit tests | ||||
16 | | ||||
17 | if(BUILD_TESTING) | ||||
18 | add_custom_target(copy ALL DEPENDS itemmodelsplugin) | ||||
19 | add_custom_command(TARGET copy POST_BUILD | ||||
20 | COMMAND ${CMAKE_COMMAND} -E | ||||
21 | copy ${CMAKE_CURRENT_SOURCE_DIR}/qmldir ${CMAKE_BINARY_DIR}/bin/org/kde/kitemmodels/qmldir) | ||||
22 | add_custom_command(TARGET copy POST_BUILD | ||||
23 | COMMAND ${CMAKE_COMMAND} -E | ||||
24 | copy $<TARGET_FILE:itemmodelsplugin> ${CMAKE_BINARY_DIR}/bin/org/kde/kitemmodels) | ||||
25 | endif() |