Skip to content

Commit

Permalink
Unique nanobind targets, one for each dyn python
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdonline committed Sep 29, 2023
1 parent d170cf1 commit 5c680bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/nrnpython/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ if(NRN_ENABLE_PYTHON_DYNAMIC)
list(GET NRN_PYTHON_VERSIONS ${val} pyver)
list(GET NRN_PYTHON_INCLUDES ${val} pyinc)
list(GET NRN_PYTHON_LIBRARIES ${val} pylib)
make_nanobind_target(nanobind ${pyinc})
set(nanobind_target "nanobind_py${pyver}")
make_nanobind_target(${nanobind_target} ${pyinc})

add_library(nrnpython${pyver} SHARED ${NRN_NRNPYTHON_SRC_FILES})
target_include_directories(nrnpython${pyver} BEFORE PUBLIC ${pyinc} ${INCLUDE_DIRS})
target_link_libraries(nrnpython${pyver} PUBLIC nrniv_lib)
target_link_libraries(nrnpython${pyver} PRIVATE ${Readline_LIBRARY} nanobind)
target_link_libraries(nrnpython${pyver} PRIVATE ${Readline_LIBRARY} ${nanobind_target})
if(NRN_LINK_AGAINST_PYTHON)
target_link_libraries(nrnpython${pyver} ${pylib})
endif()
Expand Down

0 comments on commit 5c680bb

Please sign in to comment.