aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/pybind11/usage
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/pybind11/usage
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/pybind11/usage')
-rw-r--r--vcpkg/ports/pybind11/usage12
1 files changed, 12 insertions, 0 deletions
diff --git a/vcpkg/ports/pybind11/usage b/vcpkg/ports/pybind11/usage
new file mode 100644
index 0000000..ad9349b
--- /dev/null
+++ b/vcpkg/ports/pybind11/usage
@@ -0,0 +1,12 @@
+pybind11 provides CMake integration:
+
+ # Easy
+ set(PYBIND11_FINDPYTHON ON)
+ find_package(pybind11 CONFIG REQUIRED)
+ pybind11_add_module(MyModule1 src1.cpp)
+
+ # Advanced
+ find_package(Python COMPONENTS Interpreter Development)
+ find_package(pybind11 CONFIG REQUIRED)
+ Python_add_library(MyModule2 src2.cpp)
+ target_link_libraries(MyModule2 PRIVATE pybind11::headers)