Skip to content

Commit 3350b5e

Browse files
author
Wenzel Jakob
committed
make install target optional
1 parent 19af357 commit 3350b5e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ cmake_minimum_required(VERSION 2.8)
99

1010
project(pybind11)
1111

12+
option(PYBIND11_INSTALL "Install pybind11 header files?" ON)
13+
1214
# Add a CMake parameter for choosing a desired Python version
1315
set(PYBIND11_PYTHON_VERSION "" CACHE STRING "Python version to use for compiling the example application")
1416

@@ -152,7 +154,6 @@ foreach(i RANGE 1 12)
152154
add_test(NAME example${i} COMMAND ${RUN_TEST} example${i})
153155
endforeach()
154156

155-
if (UNIX)
157+
if (PYBIND11_INSTALL)
156158
install(FILES ${PYBIND11_HEADERS} DESTINATION include/pybind11)
157159
endif()
158-

0 commit comments

Comments
 (0)