From b75212c5ddaa76b6dfca1941b5a70e64cb3bfaae Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Wed, 18 May 2022 13:00:37 +0300 Subject: [PATCH] Move install rules under PROJECT_IS_TOP_LEVEL (#154) --- CMakeLists.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 41e55dd..0a2ab37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,13 +30,9 @@ target_include_directories( target_compile_features(tomlplusplus_tomlplusplus INTERFACE cxx_std_17) -# ---- Install rules ---- - -include(cmake/install-rules.cmake) - -# ---- Examples ---- - +# ---- Install rules and examples ---- if(PROJECT_IS_TOP_LEVEL) + include(cmake/install-rules.cmake) option(BUILD_EXAMPLES "Build examples tree." OFF) if(BUILD_EXAMPLES) add_subdirectory(examples)