diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-01-17 10:22:59 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-01-17 16:17:42 +0000 |
commit | 448ca92053d62b7fd3f820f00098702c3c4bd09f (patch) | |
tree | 172a78b55cf2f100e317c0c005aa95d33111697e /CMakeLists.txt | |
parent | 6a1ee4de07cbaaeb0583b191fee6258e0a4003e4 (diff) |
CMake: Add "BUILD_EXAMPLES" option to disable examples
BUILD_EXAMPLES defaults to "ON".
Change-Id: I5dfe926d8a23b610b45a5243deeb82483d998b90
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f00d333dc..7a4b451b75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,11 @@ if (BUILD_TESTING) endif() add_subdirectory(qmake) -add_subdirectory(examples) + +option(BUILD_EXAMPLES "Build Qt examples" ON) +if (BUILD_EXAMPLES) + add_subdirectory(examples) +endif() ## Delayed actions on some of the Qt targets: include(QtPostProcess) |