Skip to content

Commit

Permalink
fix and add option to cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Huth committed Jul 1, 2024
1 parent a357e0e commit ac484b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ if (ACTSVG_BUILD_TESTING OR ACTSVG_BUILD_EXAMPLES)
endif()
endif()

option(ACTSVG_BUILD_PYTHON_BINDINGS "Build the python bindings of ACTSVG" OFF)
if(ACTSVG_BUILD_PYTHON_BINDINGS)
find_package(Python 3.8 REQUIRED COMPONENTS Interpreter Development)
option(ACTSVG_USE_SYSTEM_PYBIND11 "Pick up an existing installation of pybind11")
if(ACTSVG_USE_SYSTEM_PYBIND11)
find_package(pybind11 CONFIG REQUIRED)
else()
Expand Down
4 changes: 2 additions & 2 deletions python/src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ void add_display_module(context& ctx) {
/// @return an object (sterile if now matching view type is found)
d.def(
"surfaces_as_oriented_polygons",
[](const std::vector<const surface>& ss, const std::string& view) {
[](const std::vector<surface>& ss, const std::string& view) {
std::vector<svg::object> polygons;
for (const auto& s : ss) {
polygons.push_back(surface_as_oriented_polygon(
Expand Down Expand Up @@ -350,7 +350,7 @@ void add_display_module(context& ctx) {
///
/// @return an object (sterile if now matching view type is found)
d.def("surfaces_as_oriented_polygons",
[](const std::vector<const surface>& ss, const style::fill& f,
[](const std::vector<surface>& ss, const style::fill& f,
const style::stroke& str, const std::string& view) {
std::vector<svg::object> polygons;
for (const auto& s : ss) {
Expand Down

0 comments on commit ac484b1

Please sign in to comment.