|
8 | 8 |
|
9 | 9 | set(HUNTER_SKIP_PACKAGE_nlohmann_json OFF) |
10 | 10 | set(BUILD_SHARED_LIBS ON) |
| 11 | +# Early options |
| 12 | +option(DEPTHAI_ENABLE_LIBUSB "Enable usage of libusb and interaction with USB devices" ON) |
| 13 | + |
11 | 14 | # Set type to canonicalize relative paths for user-provided toolchain |
12 | 15 | set(CMAKE_TOOLCHAIN_FILE "" CACHE FILEPATH "CMake toolchain path") |
13 | 16 |
|
@@ -45,7 +48,7 @@ if(WIN32) |
45 | 48 | endif() |
46 | 49 |
|
47 | 50 | # Create depthai project |
48 | | -project(depthai VERSION "2.22.0" LANGUAGES CXX C) |
| 51 | +project(depthai VERSION "2.23.0" LANGUAGES CXX C) |
49 | 52 | get_directory_property(has_parent PARENT_DIRECTORY) |
50 | 53 | if(has_parent) |
51 | 54 | set(DEPTHAI_VERSION ${PROJECT_VERSION} PARENT_SCOPE) |
@@ -254,6 +257,7 @@ add_library(${TARGET_CORE_NAME} |
254 | 257 | src/utility/Environment.cpp |
255 | 258 | src/utility/XLinkGlobalProfilingLogger.cpp |
256 | 259 | src/utility/Logging.cpp |
| 260 | + src/utility/EepromDataParser.cpp |
257 | 261 | src/xlink/XLinkConnection.cpp |
258 | 262 | src/xlink/XLinkStream.cpp |
259 | 263 | src/openvino/OpenVINO.cpp |
@@ -449,13 +453,16 @@ target_link_libraries(${TARGET_CORE_NAME} |
449 | 453 | set(DEPTHAI_DEVICE_VERSION "${DEPTHAI_DEVICE_SIDE_COMMIT}") |
450 | 454 | target_compile_definitions(${TARGET_CORE_NAME} |
451 | 455 | PRIVATE |
452 | | - # XLink required define |
453 | | - __PC__ |
454 | 456 | # Add depthai-device version |
455 | 457 | DEPTHAI_DEVICE_VERSION="${DEPTHAI_DEVICE_VERSION}" |
456 | 458 | # Add depthai-bootloader version |
457 | 459 | DEPTHAI_BOOTLOADER_VERSION="${DEPTHAI_BOOTLOADER_VERSION}" |
458 | 460 | ) |
| 461 | +# Add compile flag if libusb is available |
| 462 | +if(DEPTHAI_ENABLE_LIBUSB) |
| 463 | + target_compile_definitions(${TARGET_CORE_NAME} PRIVATE DEPTHAI_ENABLE_LIBUSB) |
| 464 | + set(DEPTHAI_HAVE_LIBUSB_SUPPORT ON) |
| 465 | +endif() |
459 | 466 |
|
460 | 467 | # Add Backward dependency if enabled (On by default) |
461 | 468 | if(DEPTHAI_ENABLE_BACKWARD) |
@@ -484,8 +491,9 @@ macro(add_runtime_dependencies depending_target dependency) |
484 | 491 | set(required_dll_files ${dlls} ${depthai_dll_libraries}) |
485 | 492 | # Copy the required dlls |
486 | 493 | add_custom_command(TARGET ${depending_target} POST_BUILD COMMAND |
487 | | - ${CMAKE_COMMAND} -E copy_if_different ${required_dll_files} $<TARGET_FILE_DIR:${depending_target}> |
| 494 | + "$<$<BOOL:${required_dll_files}>:${CMAKE_COMMAND};-E;copy_if_different;${required_dll_files};$<TARGET_FILE_DIR:${depending_target}>>" |
488 | 495 | COMMAND_EXPAND_LISTS |
| 496 | + VERBATIM |
489 | 497 | ) |
490 | 498 | message(STATUS "Required dlls for core are: ${required_dll_files}") |
491 | 499 | endif() |
|
0 commit comments