From dd523573f2981cc58d4da0ec6e2b061a6172a8eb Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 10 Feb 2021 17:03:01 +0100 Subject: Add examples to the cmake build Add only quick and widget examples to the build for now. Update examples qmake files so the ci can also build qmake examples after the cmake bulid. Note this patch breakes qmake builds. Task-number: QTBUG-91760 Change-Id: Ia867a49bc3deab1967bdedcf525ad4afe3967c2a Reviewed-by: Allan Sandfeld Jensen --- CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a84f1ed58..4ce56974d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,6 +110,19 @@ externalproject_add(libs CMAKE_ARGS ${libsCmakeArgs} ) +if(QT_BUILD_EXAMPLES AND BUILD_SHARED_LIBS) + externalproject_add(examples + SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/examples + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/examples + PREFIX examples + USES_TERMINAL_BUILD ON + BUILD_ALWAYS TRUE + CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} + "${featureList}" + ) + externalproject_add_stepdependencies(examples install libs) +endif() + if(NOT Gn_FOUND) externalproject_add_stepdependencies(libs install gn) endif() -- cgit v1.2.3