Commit 184484ed authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Allow using the QML plugin in static builds

Add the necessary CMake bolierplate
parent 52179526
Pipeline #78638 passed with stage
in 18 seconds
......@@ -7,6 +7,12 @@ target_sources(kpublictransportqmlplugin PRIVATE
linemetadatawrapper.cpp
)
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(kpublictransportqmlplugin PRIVATE -DQT_PLUGIN -DQT_STATICPLUGIN=1)
set_target_properties(kpublictransportqmlplugin PROPERTIES AUTOMOC_MOC_OPTIONS -Muri=org.kde.kpublictransport)
target_sources(kpublictransportqmlplugin PRIVATE kpublictransportqml.qrc)
endif()
target_link_libraries(kpublictransportqmlplugin
Qt5::Qml
KPublicTransport
......
<!--
SPDX-FileCopyrightText: None
SPDX-License-Identifier: CC0-1.0
-->
<RCC>
<qresource prefix="/org/kde/kpublictransport/">
<file>qmldir</file>
</qresource>
</RCC>
......@@ -7,6 +7,13 @@ target_sources(kpublictransportquickplugin PRIVATE
styledsvgimageprovider.cpp
assets/assets.qrc
)
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(kpublictransportquickplugin PRIVATE -DQT_PLUGIN -DQT_STATICPLUGIN=1)
set_target_properties(kpublictransportquickplugin PROPERTIES AUTOMOC_MOC_OPTIONS -Muri=org.kde.kpublictransport.ui)
target_sources(kpublictransportquickplugin PRIVATE kpublictransportquick.qrc)
endif()
set(kpublictransportquickplugin_qml
qmldir
VehicleSectionItem.qml
......
<!--
SPDX-FileCopyrightText: None
SPDX-License-Identifier: CC0-1.0
-->
<RCC>
<qresource prefix="/org/kde/kpublictransport/ui">
<file>qmldir</file>
<file>VehicleSectionItem.qml</file>
</qresource>
</RCC>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment