From 8390c5cfb79574b60e3f45dfc36973e15752931d Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Fri, 14 Aug 2015 14:35:35 +0100 Subject: [PATCH] cmake: add option to disable example building Signed-off-by: Brendan Le Foll --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4f8d7b..37c6661 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,7 @@ option (BUILDSWIGJAVA "Build Java API." OFF) option (IPK "Generate IPK using CPack" OFF) option (RPM "Generate RPM using CPack" OFF) option (BUILDPYTHON3 "Use python3 for building/installing" OFF) +option (ENABLEEXAMPLES "Disable building of examples" ON) option (INSTALLGPIOTOOL "Install gpio tool" OFF) option (BUILDARCH "Override architecture to build for - override" OFF) option (TESTS "Override the addition of tests" ON) @@ -171,4 +172,6 @@ if (RPM) endif() add_subdirectory (src) -add_subdirectory (examples) +if (ENABLEEXAMPLES) + add_subdirectory (examples) +endif ()