diff options
author | Michal Klocek <michal.klocek@qt.io> | 2021-02-10 17:03:01 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2021-05-22 14:10:08 +0200 |
commit | dd523573f2981cc58d4da0ec6e2b061a6172a8eb (patch) | |
tree | 77f190fbe00e111362711ce14be00117a3cb7a91 /CMakeLists.txt | |
parent | e1e6e4c90071a7e4e7a12b9f529ca1da6d71e0c1 (diff) |
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 <allan.jensen@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 13 insertions, 0 deletions
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() |