Skip to content

Commit 40cd59c

Browse files
Install guard (arun11299#93)
1 parent 40bcc2d commit 40cd59c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ project(subprocess VERSION 0.0.1 LANGUAGES CXX)
44
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to use")
55
option(EXPORT_COMPILE_COMMANDS "create clang compile database" ON)
66
option(SUBPROCESS_TESTS "enable subprocess tests" OFF)
7+
option(SUBPROCESS_INSTALL "enable subprocess install" OFF)
78

89
find_package(Threads REQUIRED)
910

1011
add_library(subprocess INTERFACE)
1112
target_link_libraries(subprocess INTERFACE Threads::Threads)
1213
target_include_directories(subprocess INTERFACE . )
13-
install(FILES subprocess.hpp DESTINATION include/cpp-subprocess/)
14+
15+
if(SUBPROCESS_INSTALL)
16+
install(FILES subprocess.hpp DESTINATION include/cpp-subprocess/)
17+
endif()
1418

1519
if(SUBPROCESS_TESTS)
1620
include(CTest)

0 commit comments

Comments
 (0)