@@ -184,31 +184,35 @@ if(${OSMSCOUT_BUILD_CLIENT_QT})
184184 endif ()
185185
186186 #---- RoutingParameters
187- osmscout_demo_project(NAME RoutingParameters
188- SOURCES
189- ../OSMScout2/src/Theme.h ../OSMScout2/src/Theme.cpp
190- src/RoutingParameters.cpp
191- src/QtDemoApp.cpp
192- ${RESOURCE_FILES}
187+ if (QT_VERSION_MAJOR EQUAL 5)
188+ osmscout_demo_project(NAME RoutingParameters
189+ SOURCES
190+ ../OSMScout2/src/Theme.h ../OSMScout2/src/Theme.cpp
191+ src/RoutingParameters.cpp
192+ src/QtDemoApp.cpp
193+ ${RESOURCE_FILES}
193194
194- # qml files in CMake sources make it visible in QtCreator
195- qml/RoutingParameters.qml
196- qml/PlaceInput.qml
195+ # qml files in CMake sources make it visible in QtCreator
196+ qml/RoutingParameters.qml
197+ qml/PlaceInput.qml
197198
198- INCLUDES ../OSMScout2/src/
199- TARGET OSMScout::OSMScout OSMScout::Map OSMScout::MapQt OSMScout::ClientQt Qt::Widgets)
200- target_compile_definitions (RoutingParameters PRIVATE ${QtWidgets_DEFINITIONS} )
201- set_target_properties (RoutingParameters PROPERTIES
202- UNITY_BUILD OFF ) # generated code for qt resources use static variables with the same name
203- if (MSVC )
204- visual_studio_qt_helper("RoutingParameters" )
205- endif ()
206- if (OSMSCOUT_INSTALL_QT_DLL AND TARGET Qt::windeployqt)
207- add_custom_command (TARGET RoutingParameters
208- POST_BUILD
209- COMMAND set PATH =%PATH %$<SEMICOLON>${qt_install_prefix} /bin
210- COMMAND Qt::windeployqt --dir "${CMAKE_BINARY_DIR} /windeployqt" "$<TARGET_FILE_DIR:RoutingParameters>/$<TARGET_FILE_NAME:RoutingParameters>"
211- )
199+ INCLUDES ../OSMScout2/src/
200+ TARGET OSMScout::OSMScout OSMScout::Map OSMScout::MapQt OSMScout::ClientQt Qt::Widgets)
201+ target_compile_definitions (RoutingParameters PRIVATE ${QtWidgets_DEFINITIONS} )
202+ set_target_properties (RoutingParameters PROPERTIES
203+ UNITY_BUILD OFF ) # generated code for qt resources use static variables with the same name
204+ if (MSVC )
205+ visual_studio_qt_helper("RoutingParameters" )
206+ endif ()
207+ if (OSMSCOUT_INSTALL_QT_DLL AND TARGET Qt::windeployqt)
208+ add_custom_command (TARGET RoutingParameters
209+ POST_BUILD
210+ COMMAND set PATH =%PATH %$<SEMICOLON>${qt_install_prefix} /bin
211+ COMMAND Qt::windeployqt --dir "${CMAKE_BINARY_DIR} /windeployqt" "$<TARGET_FILE_DIR:RoutingParameters>/$<TARGET_FILE_NAME:RoutingParameters>"
212+ )
213+ endif ()
214+ else ()
215+ message (WARNING "Skip RoutingParameters demo, QML needs to be ported for Qt6 for this demo." )
212216 endif ()
213217
214218 #---- QtWidgetsDemoApp
0 commit comments