mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
CMake installation path consistency (#652)
* Add flag for installation of headers under python include directory * Allow the disabling of distutils install_headers
This commit is contained in:
committed by
Wenzel Jakob
parent
cec052b5c5
commit
d5ce82b6f5
@@ -92,6 +92,11 @@ endforeach()
|
||||
set(${PROJECT_NAME}_VERSION ${PYBIND11_VERSION_MAJOR}.${PYBIND11_VERSION_MINOR}.${PYBIND11_VERSION_PATCH})
|
||||
message(STATUS "pybind11 v${${PROJECT_NAME}_VERSION}")
|
||||
|
||||
option (USE_PYTHON_INCLUDE_DIR "Install pybind11 headers in Python include directory instead of default installation prefix" OFF)
|
||||
if (USE_PYTHON_INCLUDE_DIR)
|
||||
file(RELATIVE_PATH CMAKE_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_PREFIX} ${PYTHON_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(NOT (CMAKE_VERSION VERSION_LESS 3.0)) # CMake >= 3.0
|
||||
# Build an interface library target:
|
||||
add_library(module INTERFACE)
|
||||
|
||||
Reference in New Issue
Block a user