From 3350b5e81c0a1e69fbddb0d0a41eaa215d0f0bd2 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Tue, 24 Nov 2015 21:33:18 +0100 Subject: [PATCH] make install target optional --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 311c17dac..94f1c240b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,8 @@ cmake_minimum_required(VERSION 2.8) project(pybind11) +option(PYBIND11_INSTALL "Install pybind11 header files?" ON) + # Add a CMake parameter for choosing a desired Python version set(PYBIND11_PYTHON_VERSION "" CACHE STRING "Python version to use for compiling the example application") @@ -152,7 +154,6 @@ foreach(i RANGE 1 12) add_test(NAME example${i} COMMAND ${RUN_TEST} example${i}) endforeach() -if (UNIX) +if (PYBIND11_INSTALL) install(FILES ${PYBIND11_HEADERS} DESTINATION include/pybind11) endif() -