From 40cd59c0970960a0ef41365ae9d96c6a72ee6922 Mon Sep 17 00:00:00 2001 From: SoraKatadzuma Date: Sun, 3 Dec 2023 07:41:52 -0500 Subject: [PATCH] Install guard (#93) --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c8becc..5acf5f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,13 +4,17 @@ project(subprocess VERSION 0.0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to use") option(EXPORT_COMPILE_COMMANDS "create clang compile database" ON) option(SUBPROCESS_TESTS "enable subprocess tests" OFF) +option(SUBPROCESS_INSTALL "enable subprocess install" OFF) find_package(Threads REQUIRED) add_library(subprocess INTERFACE) target_link_libraries(subprocess INTERFACE Threads::Threads) target_include_directories(subprocess INTERFACE . ) -install(FILES subprocess.hpp DESTINATION include/cpp-subprocess/) + +if(SUBPROCESS_INSTALL) + install(FILES subprocess.hpp DESTINATION include/cpp-subprocess/) +endif() if(SUBPROCESS_TESTS) include(CTest)