Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
9119f130
Commit
9119f130
authored
Aug 01, 2016
by
Trygve Laugstøl
Browse files
Improving support for installing pybind11.
Mark the pybind11 headers as private to the target. Fixes #305
parent
f38f359f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
CMakeLists.txt
CMakeLists.txt
+3
-1
No files found.
CMakeLists.txt
View file @
9119f130
...
@@ -55,7 +55,9 @@ set(PYTHON_MODULE_EXTENSION ${PYTHON_MODULE_EXTENSION} CACHE INTERNAL "")
...
@@ -55,7 +55,9 @@ set(PYTHON_MODULE_EXTENSION ${PYTHON_MODULE_EXTENSION} CACHE INTERNAL "")
#
#
function
(
pybind11_add_module target_name
)
function
(
pybind11_add_module target_name
)
add_library
(
${
target_name
}
MODULE
${
ARGN
}
)
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
# The prefix and extension are provided by FindPythonLibsNew.cmake
set_target_properties
(
${
target_name
}
PROPERTIES PREFIX
"
${
PYTHON_MODULE_PREFIX
}
"
)
set_target_properties
(
${
target_name
}
PROPERTIES PREFIX
"
${
PYTHON_MODULE_PREFIX
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment