Performance improvements, better readme and complete python bindings
🧪 Test / test (push) Failing after 28m30s
🧪 Test / test (push) Failing after 28m30s
This commit is contained in:
@@ -21,14 +21,18 @@ if(KPN_WEB_DEBUG)
|
||||
target_link_libraries(14_debug_hub PRIVATE kpn)
|
||||
kpn_target_enable_web_debug(14_debug_hub)
|
||||
endif()
|
||||
# 07 and 08 require the Python bindings — only add if built
|
||||
if(KPN_BUILD_PYTHON)
|
||||
# These are Python scripts, not compiled targets — installed alongside kpn_python
|
||||
endif()
|
||||
# 07 and 08 are Python scripts — no compiled target needed.
|
||||
|
||||
# 09 requires OpenCV — only build if found
|
||||
find_package(OpenCV QUIET COMPONENTS core imgproc highgui videoio)
|
||||
if(OpenCV_FOUND)
|
||||
# Hybrid Python example: kpn_opencv module (requires both OpenCV and nanobind)
|
||||
if(KPN_BUILD_PYTHON)
|
||||
nanobind_add_module(kpn_opencv 09_opencv_cellshade/kpn_opencv.cpp)
|
||||
target_link_libraries(kpn_opencv PRIVATE kpn ${OpenCV_LIBS})
|
||||
target_compile_definitions(kpn_opencv PRIVATE KPN_BUILD_PYTHON)
|
||||
message(STATUS "KPN++ kpn_opencv Python module: building (OpenCV ${OpenCV_VERSION})")
|
||||
endif()
|
||||
add_executable(09_opencv_cellshade 09_opencv_cellshade/main.cpp)
|
||||
target_link_libraries(09_opencv_cellshade PRIVATE kpn ${OpenCV_LIBS})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user