Kind of fix the qml module

This commit is contained in:
outfoxxed 2024-01-24 05:24:35 -08:00
parent bd600d4117
commit a50d30687c
Signed by: outfoxxed
GPG Key ID: 4C88A185FB89301E
2 changed files with 23 additions and 3 deletions

View File

@ -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
'';
}

View File

@ -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})