Commit a6f9773 1 parent 3d4258a commit a6f9773 Copy full SHA for a6f9773
File tree 4 files changed +29
-8
lines changed
4 files changed +29
-8
lines changed Original file line number Diff line number Diff line change @@ -160,12 +160,6 @@ cmake_dependent_option(
160
160
161
161
ADD_PROJECT_DEPENDENCY(Eigen3 REQUIRED PKG_CONFIG_REQUIRES "eigen3 >= 3.0.0" )
162
162
163
- if (BUILD_PYTHON_INTERFACE)
164
- set (PYTHON_COMPONENTS Interpreter Development NumPy)
165
- FINDPYTHON(REQUIRED)
166
- ADD_PROJECT_PRIVATE_DEPENDENCY(eigenpy 2.9.2 REQUIRED)
167
- endif ()
168
-
169
163
# Required dependencies
170
164
SET_BOOST_DEFAULT_OPTIONS()
171
165
EXPORT_BOOST_DEFAULT_OPTIONS()
@@ -515,6 +509,7 @@ add_subdirectory(doc)
515
509
add_subdirectory (src)
516
510
if (BUILD_PYTHON_INTERFACE)
517
511
add_subdirectory (python)
512
+ add_subdirectory (python-nb)
518
513
endif ()
519
514
if (BUILD_TESTING)
520
515
add_subdirectory (test )
Original file line number Diff line number Diff line change
1
+ find_package (Python REQUIRED COMPONENTS Interpreter Development)
2
+ find_package (nanobind CONFIG REQUIRED)
3
+
4
+ set (PYTHON_LIB_NAME_V2 coal_pywrap_v2)
5
+ set (coal_pywrap_v2_SOURCES coal.cc)
6
+
7
+ nanobind_add_module(${PYTHON_LIB_NAME_V2} NB_STATIC NB_SUPPRESS_WARNINGS ${coal_pywrap_v2_SOURCES} )
8
+ target_link_libraries (
9
+ ${PYTHON_LIB_NAME_V2}
10
+ PRIVATE ${PROJECT_NAME} Boost::system
11
+ )
12
+ target_compile_definitions (
13
+ ${PYTHON_LIB_NAME_V2}
14
+ PRIVATE COAL_PYTHON_LIBNAME=${PYTHON_LIB_NAME_V2}
15
+ )
Original file line number Diff line number Diff line change
1
+ // / Copyright 2025 INRIA
2
+ #include < nanobind/nanobind.h>
3
+
4
+ NB_MODULE (COAL_PYTHON_LIBNAME, m) {}
Original file line number Diff line number Diff line change 32
32
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
33
# POSSIBILITY OF SUCH DAMAGE.
34
34
35
- include (${JRL_CMAKE_MODULES} /python-helpers.cmake)
36
- include (${JRL_CMAKE_MODULES} /stubs.cmake)
35
+ if (BUILD_PYTHON_INTERFACE)
36
+ set (PYTHON_COMPONENTS Interpreter Development NumPy)
37
+ FINDPYTHON(REQUIRED)
38
+ ADD_PROJECT_PRIVATE_DEPENDENCY(eigenpy 2.9.2 REQUIRED)
39
+ endif ()
40
+
41
+ if (GENERATE_PYTHON_STUBS)
42
+ include (${JRL_CMAKE_MODULES} /stubs.cmake)
43
+ endif (GENERATE_PYTHON_STUBS)
37
44
38
45
add_custom_target (${PROJECT_NAME} _python)
39
46
set_target_properties (
You can’t perform that action at this time.
0 commit comments