Move install rules under PROJECT_IS_TOP_LEVEL (#154)

This commit is contained in:
Hennadii Chernyshchyk 2022-05-18 13:00:37 +03:00 committed by GitHub
parent 39b80f6c56
commit b75212c5dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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