Commit cebffafd authored by Baptiste Esteban's avatar Baptiste Esteban
Browse files

Separate pylena module and ndbuffer <-> numpy for extensibility

parent 4ba59e0a
Pipeline #26371 failed with stages
in 4 minutes and 28 seconds
add_library(pylena_numpy)
target_include_directories(pylena_numpy PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include ${CONAN_LIB_DIRS_PYBIND11} ${PYTHON_INCLUDE_DIRS})
target_sources(pylena_numpy PRIVATE src/core/image_cast.cpp
src/core/numpy_format.cpp)
target_link_libraries(pylena_numpy PRIVATE Pylene)
pybind11_add_module(pylena)
target_link_libraries(pylena PRIVATE Pylene)
target_link_libraries(pylena PRIVATE Pylene pylena_numpy)
target_include_directories(pylena PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_sources(pylena PRIVATE src/module.cpp
src/core/image_cast.cpp
src/core/numpy_format.cpp)
\ No newline at end of file
target_sources(pylena PRIVATE src/module.cpp)
\ No newline at end of file
pybind11_find_import(numpy REQUIRED)
# Python module for testing
set(PYTHON_PYLENE_SRC ${CMAKE_SOURCE_DIR}/pylene-python/src)
pybind11_add_module(pylena_test pylena_test.cpp
${PYTHON_PYLENE_SRC}/core/image_cast.cpp
${PYTHON_PYLENE_SRC}/core/numpy_format.cpp)
target_link_libraries(pylena_test PRIVATE Pylene)
pybind11_add_module(pylena_test pylena_test.cpp)
target_link_libraries(pylena_test PRIVATE Pylene pylena_numpy)
target_include_directories(pylena_test PRIVATE ${CMAKE_SOURCE_DIR}/pylene-python/include)
# Sanitizer (clang linked statically asan by default unlike gcc)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment