"vscode:/vscode.git/clone" did not exist on "aa79af09f6598bbc6f66ea3b378fd3546da8f8ba"
Commit 9119f130 authored by Trygve Laugstøl's avatar Trygve Laugstøl
Browse files

Improving support for installing pybind11.

Mark the pybind11 headers as private to the target.

Fixes #305
parent f38f359f
......@@ -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}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment