Skip to content

Commit

Permalink
use system pybind11 package (#167)
Browse files Browse the repository at this point in the history
* use system pybind11 package

* do not build apps for Python bindings

* set correct RPATH for Python binding shared object
  • Loading branch information
christian-rauch authored Feb 21, 2025
1 parent df839a8 commit 59886db
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@
[submodule "thirdparty/nvbio"]
path = thirdparty/nvbio
url = https://github.com/NVlabs/nvbio.git
[submodule "thirdparty/pybind11"]
path = thirdparty/pybind11
url = https://github.com/pybind/pybind11.git
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ endif()

### Python bindings ###
if(BUILD_PYTHON_BINDINGS)
add_subdirectory(thirdparty/pybind11)
find_package(pybind11 CONFIG)
pybind11_add_module(pygicp
src/python/main.cpp
)
Expand All @@ -103,6 +103,10 @@ if(BUILD_PYTHON_BINDINGS)
target_link_libraries(pygicp PRIVATE
fast_gicp
)
set_target_properties(pygicp PROPERTIES
INSTALL_RPATH "$ORIGIN/"
BUILD_WITH_INSTALL_RPATH TRUE
)
endif()

### CUDA ###
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def build_extension(self, ext):
"-DCMAKE_BUILD_TYPE={}".format(cfg), # not used on MSVC, but no harm,
# "-DBUILD_VGICP_CUDA=ON",
"-DBUILD_PYTHON_BINDINGS=ON",
"-DBUILD_apps=OFF",
]
build_args = []

Expand Down
1 change: 0 additions & 1 deletion thirdparty/pybind11
Submodule pybind11 deleted from 0e01c2

0 comments on commit 59886db

Please sign in to comment.