From 448ca92053d62b7fd3f820f00098702c3c4bd09f Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 17 Jan 2019 10:22:59 +0100 Subject: CMake: Add "BUILD_EXAMPLES" option to disable examples BUILD_EXAMPLES defaults to "ON". Change-Id: I5dfe926d8a23b610b45a5243deeb82483d998b90 Reviewed-by: Liang Qi Reviewed-by: Simon Hausmann Reviewed-by: Mikhail Svetkin --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3