QmlProject: Use FetchContent_Populate for CMake 3.3

Since CMake 3.30, FetchContent_Populate() with only
one argument is deprecated, and will generate a
configure time warning.

We use FetchContent_MakeAvailable instead which already includes
the add_subdirectory.

Task-number: QDS-13600
Change-Id: I8c1ed45468e620813c66f4981753c046526531dc
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
This commit is contained in:
Thomas Hartmann
2024-09-12 11:31:04 +02:00
parent db5a7d28fa
commit 3b06797374

View File

@@ -14,7 +14,13 @@ FetchContent_Declare(
)
FetchContent_GetProperties(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
)