From 9baaf1da9fbaec1e7d7463981d04124b0b8d25f0 Mon Sep 17 00:00:00 2001 From: Parker Lusk Date: Wed, 9 Dec 2020 14:57:51 -0500 Subject: [PATCH] feat: add option to exclude building examples --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b673d84..8c9cae5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,7 @@ add_library(plot INTERFACE) target_include_directories(plot INTERFACE include) option(BUILD_SINGLE_HEADER "Pack all headers into a single header library" OFF) +option(BUILD_EXAMPLES "Build plot examples" ON) if(BUILD_SINGLE_HEADER) find_package(PythonInterp 3 REQUIRED) @@ -66,4 +67,7 @@ if(BUILD_SINGLE_HEADER) single-header ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/plot.hpp") endif() -add_subdirectory(examples) + +if(BUILD_EXAMPLES) + add_subdirectory(examples) +endif()