Skip to content

Commit 59886db

Browse files
use system pybind11 package (#167)
* use system pybind11 package * do not build apps for Python bindings * set correct RPATH for Python binding shared object
1 parent df839a8 commit 59886db

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,3 @@
77
[submodule "thirdparty/nvbio"]
88
path = thirdparty/nvbio
99
url = https://github.com/NVlabs/nvbio.git
10-
[submodule "thirdparty/pybind11"]
11-
path = thirdparty/pybind11
12-
url = https://github.com/pybind/pybind11.git

CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ endif()
9191

9292
### Python bindings ###
9393
if(BUILD_PYTHON_BINDINGS)
94-
add_subdirectory(thirdparty/pybind11)
94+
find_package(pybind11 CONFIG)
9595
pybind11_add_module(pygicp
9696
src/python/main.cpp
9797
)
@@ -103,6 +103,10 @@ if(BUILD_PYTHON_BINDINGS)
103103
target_link_libraries(pygicp PRIVATE
104104
fast_gicp
105105
)
106+
set_target_properties(pygicp PROPERTIES
107+
INSTALL_RPATH "$ORIGIN/"
108+
BUILD_WITH_INSTALL_RPATH TRUE
109+
)
106110
endif()
107111

108112
### CUDA ###

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def build_extension(self, ext):
5050
"-DCMAKE_BUILD_TYPE={}".format(cfg), # not used on MSVC, but no harm,
5151
# "-DBUILD_VGICP_CUDA=ON",
5252
"-DBUILD_PYTHON_BINDINGS=ON",
53+
"-DBUILD_apps=OFF",
5354
]
5455
build_args = []
5556

thirdparty/pybind11

-1
This file was deleted.

0 commit comments

Comments
 (0)