Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Libraries
KPublicTransport
Commits
52b1f4c3
Commit
52b1f4c3
authored
Oct 27, 2021
by
Nicolas Fella
Browse files
Port to ECMQmlModule
parent
c97516bf
Pipeline
#139819
passed with stages
in 5 minutes and 36 seconds
Changes
9
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
52b1f4c3
...
...
@@ -10,7 +10,7 @@ set (RELEASE_SERVICE_VERSION_MICRO "70")
set
(
RELEASE_SERVICE_VERSION
"
${
RELEASE_SERVICE_VERSION_MAJOR
}
.
${
RELEASE_SERVICE_VERSION_MINOR
}
.
${
RELEASE_SERVICE_VERSION_MICRO
}
"
)
project
(
KPublicTransport VERSION
${
RELEASE_SERVICE_VERSION
}
)
find_package
(
ECM 5.
85
REQUIRED NO_MODULE
)
find_package
(
ECM 5.
91
REQUIRED NO_MODULE
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
${
ECM_MODULE_PATH
}
${
ECM_KDE_MODULE_DIR
}
)
include
(
KDECompilerSettings NO_POLICY_SCOPE
)
...
...
@@ -24,6 +24,7 @@ include(KDEInstallDirs)
include
(
KDECMakeSettings
)
include
(
GenerateExportHeader
)
include
(
ECMAddQch
)
include
(
ECMQmlModule
)
option
(
BUILD_QCH
"Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)"
OFF
)
add_feature_info
(
QCH
${
BUILD_QCH
}
"API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)"
)
...
...
src/qmlplugin/CMakeLists.txt
View file @
52b1f4c3
# SPDX-FileCopyrightText: 2018 Volker Krause <vkrause@kde.org>
# SPDX-License-Identifier: BSD-3-Clause
add_library
(
kpublictransportqmlplugin
)
target_sources
(
kpublictransportqmlplugin PRIVATE
kpublictransportqmlplugin.cpp
linemetadatawrapper.cpp
)
ecm_add_qml_module
(
kpublictransportqmlplugin URI
"org.kde.kpublictransport"
VERSION 1.0
)
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
)
# make examples work without installation
set_property
(
TARGET kpublictransportqmlplugin PROPERTY LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_RUNTIME_OUTPUT_DIRECTORY
}
/org/kde/kpublictransport
)
file
(
COPY qmldir DESTINATION
${
CMAKE_RUNTIME_OUTPUT_DIRECTORY
}
/org/kde/kpublictransport
)
install
(
TARGETS kpublictransportqmlplugin DESTINATION
${
QML_INSTALL_DIR
}
/org/kde/kpublictransport
)
install
(
FILES qmldir
${
qml_SRC
}
DESTINATION
${
QML_INSTALL_DIR
}
/org/kde/kpublictransport
)
target_sources
(
kpublictransportqmlplugin PRIVATE kpublictransportqmlplugin.cpp linemetadatawrapper.cpp
)
target_link_libraries
(
kpublictransportqmlplugin PRIVATE Qt::Quick KPublicTransport
)
ecm_finalize_qml_module
(
kpublictransportqmlplugin DESTINATION
${
KDE_INSTALL_QMLDIR
}
)
src/qmlplugin/kpublictransportqml.qrc
deleted
100644 → 0
View file @
c97516bf
<!--
SPDX-FileCopyrightText: None
SPDX-License-Identifier: CC0-1.0
-->
<RCC>
<qresource prefix="/org/kde/kpublictransport/">
<file>qmldir</file>
</qresource>
</RCC>
src/qmlplugin/qmldir
deleted
100644 → 0
View file @
c97516bf
module org.kde.kpublictransport
plugin kpublictransportqmlplugin
classname KPublicTransportQmlPlugin
src/qmlplugin/qmldir.license
deleted
100644 → 0
View file @
c97516bf
SPDX-License-Identifier: CC0-1.0
SPDX-FileCopyrightText: Volker Krause <vkrause@kde.org>
src/quick/CMakeLists.txt
View file @
52b1f4c3
# SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org>
# SPDX-License-Identifier: BSD-3-Clause
add_library
(
kpublictransportquickplugin
)
ecm_add_qml_module
(
kpublictransportquickplugin URI
"org.kde.kpublictransport.ui"
VERSION 1.0
)
target_sources
(
kpublictransportquickplugin PRIVATE
kpublictransportquickplugin.cpp
styledframesvgitem.cpp
...
...
@@ -9,24 +10,8 @@ target_sources(kpublictransportquickplugin PRIVATE
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
)
target_link_libraries
(
kpublictransportquickplugin
Qt5::Quick
)
ecm_target_qml_sources
(
kpublictransportquickplugin SOURCES VehicleSectionItem.qml VERSION 1.0
)
# make examples work without installation
set_property
(
TARGET kpublictransportquickplugin PROPERTY LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_RUNTIME_OUTPUT_DIRECTORY
}
/org/kde/kpublictransport/ui
)
file
(
COPY
${
kpublictransportquickplugin_qml
}
DESTINATION
${
CMAKE_RUNTIME_OUTPUT_DIRECTORY
}
/org/kde/kpublictransport/ui
)
target_link_libraries
(
kpublictransportquickplugin PRIVATE Qt::Quick
)
install
(
TARGETS kpublictransportquickplugin DESTINATION
${
QML_INSTALL_DIR
}
/org/kde/kpublictransport/ui
)
install
(
FILES
${
kpublictransportquickplugin_qml
}
${
quick_SRC
}
DESTINATION
${
QML_INSTALL_DIR
}
/org/kde/kpublictransport/ui
)
ecm_finalize_qml_module
(
kpublictransportquickplugin DESTINATION
${
KDE_INSTALL_QMLDIR
}
)
src/quick/kpublictransportquick.qrc
deleted
100644 → 0
View file @
c97516bf
<!--
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>
src/quick/qmldir
deleted
100644 → 0
View file @
c97516bf
module org.kde.kpublictransport.ui
plugin kpublictransportquickplugin
classname KPublicTransportQuickPlugin
VehicleSectionItem 1.0 VehicleSectionItem.qml
src/quick/qmldir.license
deleted
100644 → 0
View file @
c97516bf
SPDX-License-Identifier: CC0-1.0
SPDX-FileCopyrightText: Volker Krause <vkrause@kde.org>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment