diff --git a/src/plugins/qmlprojectmanager/qmlprojectexporter/templates/qmlcomponents.tpl b/src/plugins/qmlprojectmanager/qmlprojectexporter/templates/qmlcomponents.tpl index cf1d159a7e1..feb6797f9f1 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectexporter/templates/qmlcomponents.tpl +++ b/src/plugins/qmlprojectmanager/qmlprojectexporter/templates/qmlcomponents.tpl @@ -14,7 +14,13 @@ FetchContent_Declare( ) FetchContent_GetProperties(ds) -FetchContent_Populate(ds) + +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.30") + FetchContent_MakeAvailable(ds) +else () + FetchContent_Populate(ds) + add_subdirectory(${ds_SOURCE_DIR} ${ds_BINARY_DIR}) +endif() target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE QuickStudioComponentsplugin @@ -29,8 +35,6 @@ target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE QuickStudioUtilsplugin ) -add_subdirectory(${ds_SOURCE_DIR} ${ds_BINARY_DIR}) - target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE BUILD_QDS_COMPONENTS=true )