From 00923cf4a2c99c26199b516391184b263e3ad511 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 28 Apr 2014 02:37:14 +0200 Subject: [PATCH] Make examples optional (default to off) Review: 117814 --- CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc5d6d041..aea6a001c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,6 +127,12 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_STRICT_ITERATORS -DQT_NO_CAST_FR include(KF5PlasmaMacros.cmake) +######################################################################### + + +option(BUILD_EXAMPLES "Build and install Plasma examples." OFF) + + ################ create PlasmaConfig.cmake and install it ########################### # create a Config.cmake and a ConfigVersion.cmake file and install them @@ -166,7 +172,11 @@ if (KF5DocTools_FOUND) endif() add_definitions(-DTRANSLATION_DOMAIN=\"libplasma5\") add_subdirectory(src) -add_subdirectory(examples) + +if (BUILD_EXAMPLES) + add_subdirectory(examples) +endif() + add_subdirectory(autotests) add_subdirectory(tests)