2020-11-16 00:16:03 +00:00
|
|
|
add_library(kdeconnectdeclarativeplugin SHARED
|
2013-08-21 17:28:11 +01:00
|
|
|
kdeconnectdeclarativeplugin.cpp
|
2014-01-28 22:22:59 +00:00
|
|
|
responsewaiter.cpp
|
2019-07-22 21:48:06 +01:00
|
|
|
objectfactory.cpp
|
2021-07-23 19:28:22 +01:00
|
|
|
pointerlocker.cpp
|
2020-11-16 00:16:03 +00:00
|
|
|
resources.qrc
|
2014-01-28 22:22:59 +00:00
|
|
|
)
|
2013-08-21 17:28:11 +01:00
|
|
|
target_link_libraries(kdeconnectdeclarativeplugin
|
2014-06-16 19:02:07 +01:00
|
|
|
Qt5::Qml
|
2014-06-14 15:50:54 +01:00
|
|
|
kdeconnectinterfaces
|
2019-10-27 17:08:51 +00:00
|
|
|
kdeconnectcore
|
2013-08-21 17:28:11 +01:00
|
|
|
)
|
2019-07-22 23:41:12 +01:00
|
|
|
|
2021-07-23 19:28:22 +01:00
|
|
|
if (TARGET KF5::WaylandClient)
|
|
|
|
target_sources(kdeconnectdeclarativeplugin PRIVATE pointerlockerwayland.cpp)
|
|
|
|
target_link_libraries(kdeconnectdeclarativeplugin KF5::WaylandClient)
|
|
|
|
target_compile_definitions(kdeconnectdeclarativeplugin PRIVATE -DWITH_WAYLAND=1)
|
|
|
|
else()
|
|
|
|
target_compile_definitions(kdeconnectdeclarativeplugin PRIVATE -DWITH_WAYLAND=0)
|
|
|
|
endif()
|
|
|
|
|
2014-06-18 01:35:48 +01:00
|
|
|
install(TARGETS kdeconnectdeclarativeplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/kdeconnect)
|
2019-07-22 23:40:12 +01:00
|
|
|
install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/kdeconnect)
|
2019-07-22 23:41:12 +01:00
|
|
|
|
2021-05-09 18:33:52 +01:00
|
|
|
ecm_generate_qmltypes(org.kde.kdeconnect 1.0 DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kdeconnect)
|
|
|
|
|
2019-07-22 23:41:12 +01:00
|
|
|
# So qml apps using this plugin can be run from build/bin directory
|
|
|
|
add_custom_target(copy_to_build_dir_bin)
|
2019-07-23 17:48:39 +01:00
|
|
|
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin/org/kde/kdeconnect)
|
|
|
|
add_custom_command(TARGET copy_to_build_dir_bin
|
2019-07-22 23:41:12 +01:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E
|
|
|
|
copy ${CMAKE_CURRENT_SOURCE_DIR}/qmldir ${CMAKE_BINARY_DIR}/bin/org/kde/kdeconnect/)
|
|
|
|
add_dependencies(kdeconnectdeclarativeplugin copy_to_build_dir_bin)
|
|
|
|
set_target_properties(kdeconnectdeclarativeplugin
|
|
|
|
PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/org/kde/kdeconnect/
|
|
|
|
)
|