diff options
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | examples/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/location/CMakeLists.txt | 20 | ||||
-rw-r--r-- | examples/location/mapviewer/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/configure.cmake | 2 |
5 files changed, 18 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f041881..5f8e7360 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,11 @@ endif() # Otherwise we'll get an "QtPositioning not found" error in WASM build. find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Positioning Network) # special case find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Quick Qml Test QuickTest PositioningQuick ShaderTools) # special case +find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS + # Needed when building examples in-tree + Widgets + Sql +) macro(assertTargets) foreach(qtTarget IN ITEMS ${ARGN}) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 6dc8720a..24062c8a 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,7 +1,7 @@ # Generated from examples.pro. qt_examples_build_begin(EXTERNAL_BUILD) -if(TARGET Qt::Location AND TARGET Qt::Positioning) +if(TARGET Qt::Location) add_subdirectory(location) endif() qt_examples_build_end() diff --git a/examples/location/CMakeLists.txt b/examples/location/CMakeLists.txt index b36f5bd9..14cfd70e 100644 --- a/examples/location/CMakeLists.txt +++ b/examples/location/CMakeLists.txt @@ -1,14 +1,14 @@ # Generated from location.pro. if(TARGET Qt::Quick) - add_subdirectory(places) - add_subdirectory(places_list) - add_subdirectory(places_map) -# add_subdirectory(mapviewer) - add_subdirectory(minimal_map) - add_subdirectory(itemview_transitions) - add_subdirectory(planespotter) + #qt_internal_add_example(places) # Not ported yet + qt_internal_add_example(places_list) + qt_internal_add_example(places_map) + qt_internal_add_example(mapviewer) + qt_internal_add_example(minimal_map) + qt_internal_add_example(itemview_transitions) + qt_internal_add_example(planespotter) +endif() +if(TARGET Qt::Quick AND TARGET Qt::Widgets) + qt_internal_add_example(geojson_viewer) endif() -#if(TARGET Qt::Quick AND TARGET Qt::Widgets) -# add_subdirectory(geojson_viewer) -#endif() diff --git a/examples/location/mapviewer/CMakeLists.txt b/examples/location/mapviewer/CMakeLists.txt index dae0a81c..fa15dca4 100644 --- a/examples/location/mapviewer/CMakeLists.txt +++ b/examples/location/mapviewer/CMakeLists.txt @@ -82,18 +82,12 @@ qt6_add_resources(qml_location_mapviewer "mapviewer" ${mapviewer_resource_files} ) -if(QT_FEATURE_geoservices_mapboxgl) +if(QT_FEATURE_geoservices_maplibregl) target_link_libraries(qml_location_mapviewer PUBLIC Qt::Sql ) endif() -if(QT_FEATURE_geoservices_osm) - target_link_libraries(qml_location_mapviewer PUBLIC - Qt::Concurrent - ) -endif() - install(TARGETS qml_location_mapviewer RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/src/configure.cmake b/src/configure.cmake index 0c1e571f..56f950b5 100644 --- a/src/configure.cmake +++ b/src/configure.cmake @@ -7,5 +7,5 @@ qt_feature("location-labs-plugin" PRIVATE qt_feature("geoservices_osm" PRIVATE LABEL "Provides access to OpenStreetMap geoservices" - CONDITION QT_FEATURE_concurrent + CONDITION TRUE ) |