Skip to content

Commit

Permalink
Move bindings to extras/bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethassogba committed Nov 28, 2024
1 parent 785890a commit 80eaf24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,16 @@ add_executable(main examples/main.cpp) # create an executable using the specifie
target_link_libraries(main PRIVATE ${LINK_LIBS})
target_compile_options(main PRIVATE -Wall -Wextra -Wconversion -pedantic)

# nanobind extension
# Compile extension module with size optimization and add demeter library
nanobind_add_module(_demeter # Name of the extension
STABLE_ABI # Target the stable ABI for Python 3.12+
NB_DOMAIN demeter
# Extension source code
extras/bindings/material.cpp)
target_link_libraries(_demeter PRIVATE demeter)
# Install directive for scikit-build-core
if (SKBUILD)
# nanobind extension
# Compile extension module with size optimization and add demeter library
nanobind_add_module(_demeter # Name of the extension
STABLE_ABI # Target the stable ABI for Python 3.12+
NB_DOMAIN demeter
# Extension source code
src/demeter/model/material.bind.cpp)
target_link_libraries(_demeter PRIVATE demeter)

install(TARGETS _demeter LIBRARY DESTINATION ${SKBUILD_PROJECT_NAME})
# install(TARGETS _demeter LIBRARY DESTINATION demeterpy)
endif()
Expand Down
File renamed without changes.

0 comments on commit 80eaf24

Please sign in to comment.