Example pybind11 module built with a CMake-based build system
Find a file
2016-06-03 21:41:25 +02:00
conda.recipe Add conda recipe 2016-06-03 09:30:23 -04:00
pybind11@0a07805ab6 Switch submodule url to main pybind11 repository 2016-05-29 15:25:00 +02:00
src Initial commit 2016-05-23 00:22:06 +02:00
.appveyor.yml Configure AppVeyor 2016-05-25 14:25:18 +02:00
.gitignore Initial commit 2016-05-23 00:22:06 +02:00
.gitmodules Switch submodule url to main pybind11 repository 2016-05-29 15:25:00 +02:00
.travis.yml Configure Travis CI 2016-05-25 13:20:56 +02:00
CMakeLists.txt Initial commit 2016-05-23 00:22:06 +02:00
LICENSE Add conda recipe 2016-06-03 09:30:23 -04:00
license.md Initial commit 2016-05-23 00:22:06 +02:00
readme.md Initial commit 2016-05-23 00:22:06 +02:00
setup.py Initial commit 2016-05-23 00:22:06 +02:00
test.py Configure Travis CI 2016-05-25 13:20:56 +02:00

Building pybind11 modules with CMake

An example of building a Python extension using pybind11 and CMake. This is useful for C++ codebases that already have an existing CMake-based build system.

Install

  1. Make sure CMake >= 2.8.12 is installed on your system
  2. Clone this repository
  3. pip install ./pybind11_cmake_example

Test

import cmake_example
cmake_example.add(1, 2)