Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option TOMLPLUSPLUS_CPP_INSTALL to determine whether to install tomlplusplus #240

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ target_include_directories(
target_compile_features(tomlplusplus_tomlplusplus INTERFACE cxx_std_17)

# ---- Install rules, examples, and fuzzing ----
if(PROJECT_IS_TOP_LEVEL)
if (tomlplusplus_INSTALL)
include(cmake/install-rules.cmake)
endif()

if(PROJECT_IS_TOP_LEVEL)
option(BUILD_EXAMPLES "Build examples tree." OFF)
option(BUILD_FUZZER "Build fuzzer." OFF)
if(BUILD_EXAMPLES)
Expand Down
1 change: 1 addition & 0 deletions cmake/variables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# This is to provide a user experience similar to find_package when
# add_subdirectory or FetchContent is used to consume this project
set(tomlplusplus_warning_guard "")
option(tomlplusplus_INSTALL "Enable generation of tomlplusplus install targets" ${PROJECT_IS_TOP_LEVEL})
if(NOT PROJECT_IS_TOP_LEVEL)
option(
tomlplusplus_INCLUDES_WITH_SYSTEM
Expand Down