This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build a Python extension module using pybind11 | |
# pybindings_add_module(<module>) | |
# Here <module> should be the fully qualified name for the module, | |
# e.g. pybindings_add_module(foo.bar._baz) | |
# <module> becomes the target name in case you wish to do something to it later | |
# The source for the binding *must* be placed in src/pybindings/{relpath}/py{name}.cc | |
# E.g. for module=foo.bar._baz -> src/pybindings/bar/py_baz.cc | |
function(pybindings_add_module module) | |
set(target_name ${module}) | |
string(REPLACE "." "/" modpath ${module}) |