mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 13:15:12 +00:00
Merge pull request #306 from trygvis/pybind-305-1
Mark pybind11 include dir as PRIVATE to avoid a CMake error message.
This commit is contained in:
commit
3da5edec1f
@ -55,7 +55,9 @@ set(PYTHON_MODULE_EXTENSION ${PYTHON_MODULE_EXTENSION} CACHE INTERNAL "")
|
||||
#
|
||||
function(pybind11_add_module target_name)
|
||||
add_library(${target_name} MODULE ${ARGN})
|
||||
target_include_directories(${target_name} PUBLIC ${PYBIND11_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS})
|
||||
target_include_directories(${target_name}
|
||||
PRIVATE ${PYBIND11_INCLUDE_DIR}
|
||||
PUBLIC ${PYTHON_INCLUDE_DIRS})
|
||||
|
||||
# The prefix and extension are provided by FindPythonLibsNew.cmake
|
||||
set_target_properties(${target_name} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
|
||||
|
Loading…
Reference in New Issue
Block a user