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>
This commit is contained in:
Tobias Hunger 2019-01-17 10:22:59 +01:00
parent 6a1ee4de07
commit 448ca92053

View File

@ -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)