From a50d30687cc03ae4da177033faf5f038c3e1a8b2 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Wed, 24 Jan 2024 05:24:35 -0800 Subject: [PATCH] Kind of fix the qml module --- default.nix | 5 +++++ src/declarative/CMakeLists.txt | 21 ++++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/default.nix b/default.nix index b6093a9..ac8e15a 100644 --- a/default.nix +++ b/default.nix @@ -20,4 +20,9 @@ wayland wayland-protocols ]; + + postInstall = '' + # I have no idea why qt's cmake module refuses to set this correctly, I give up. + cp $out/lib/qt-6/qml/org/kde/layershell/libLayerShellQtQml.so $out/lib/qt-6/qml/org/kde/layershell/libLayerShellQtQmlplugin.so + ''; } diff --git a/src/declarative/CMakeLists.txt b/src/declarative/CMakeLists.txt index bc4d740..d65f66d 100644 --- a/src/declarative/CMakeLists.txt +++ b/src/declarative/CMakeLists.txt @@ -2,12 +2,27 @@ # SPDX-License-Identifier: BSD-3-Clause qt_add_qml_module(LayerShellQtQml - URI "org.kde.layershell" + URI "org.kde.layershell" SHARED VERSION 1.0 SOURCES layershellqtplugin.cpp) + target_link_libraries(LayerShellQtQml PRIVATE Qt::Qml LayerShellQtInterface) -install(TARGETS LayerShellQtQml LIBRARY DESTINATION ${KDE_INSTALL_QMLDIR}) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir DESTINATION ${KDE_INSTALL_QMLDIR}) +qt6_query_qml_module(LayerShellQtQml + PLUGIN_TARGET module_plugin_target + TARGET_PATH module_target_path + QMLDIR module_qmldir + TYPEINFO module_typeinfo +) + +set(module_dir ${KDE_INSTALL_QMLDIR}/${module_target_path}) + +install(TARGETS LayerShellQtQml + LIBRARY DESTINATION "${module_dir}" + RUNTIME DESTINATION "${module_dir}" +) + +install(FILES "${module_qmldir}" DESTINATION "${module_dir}") +install(FILES "${module_typeinfo}" DESTINATION "${module_dir}") #ecm_finalize_qml_module(LayerShellQtQml DESTINATION ${KDE_INSTALL_QMLDIR})