72 lines
3.3 KiB
Diff
72 lines
3.3 KiB
Diff
--- a/depthai-core/CMakeLists.txt
|
|
+++ b/depthai-core/CMakeLists.txt
|
|
@@ -276,16 +276,12 @@ endif()
|
|
|
|
# Set constant
|
|
set(DEPTHAI_RESOURCES_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/resources")
|
|
+message(STATUS "resource folder: ${DEPTHAI_RESOURCES_OUTPUT_DIR}")
|
|
|
|
# Include configuration
|
|
include(Depthai/DepthaiDeviceSideConfig) # Depthai device binary commit/version configuration
|
|
include(Depthai/DepthaiBootloaderConfig) # Depthai bootloader binary commit/version configuration
|
|
|
|
-# Include downloaders
|
|
-include(DepthaiDownloader) # Depthai device binary downloader
|
|
-include(DepthaiBootloaderDownloader) # Depthai bootloader binary downloader
|
|
-
|
|
-
|
|
# depthai-shared enforce commit hash match if CI
|
|
if($ENV{CI})
|
|
set(DEPTHAI_SHARED_COMMIT_HASH_ENFORCE ON)
|
|
@@ -293,47 +289,9 @@ if($ENV{CI})
|
|
endif()
|
|
|
|
if(DEPTHAI_BINARIES_RESOURCE_COMPILE)
|
|
-
|
|
- # Then get the Depthai device side binaries (local or download)
|
|
- if(DEPTHAI_CMD_PATH OR DEPTHAI_USB2_CMD_PATH OR DEPTHAI_USB2_PATCH_PATH)
|
|
- # Atleast one of the paths is set. include binaries locally
|
|
- message(STATUS "Using local Depthai device side binaries...")
|
|
-
|
|
- DepthaiLocal(
|
|
- PATCH_ONLY ${DEPTHAI_USB2_PATCH_ONLY_MODE}
|
|
- "${DEPTHAI_RESOURCES_OUTPUT_DIR}" # Output folder
|
|
- DEPTHAI_RESOURCE_LIST # List of output resources
|
|
- "${DEPTHAI_CMD_PATH}" # depthai.cmd
|
|
- "${DEPTHAI_USB2_CMD_PATH}" # depthai-usb2.cmd
|
|
- "${DEPTHAI_USB2_PATCH_PATH}" # depthai-usb2-patch.patch
|
|
- )
|
|
-
|
|
- else()
|
|
- # No user specified paths, download from server
|
|
- message(STATUS "Downloading Depthai device side binaries from server...")
|
|
-
|
|
- DepthaiDownload(
|
|
- "${DEPTHAI_SHARED_COMMIT_HASH}" "${DEPTHAI_SHARED_COMMIT_HASH_ENFORCE}"
|
|
- PATCH_ONLY ${DEPTHAI_USB2_PATCH_ONLY_MODE}
|
|
- "${DEPTHAI_RESOURCES_OUTPUT_DIR}" # Output folder
|
|
- DEPTHAI_RESOURCE_LIST # List of output resources
|
|
- "${DEPTHAI_DEVICE_SIDE_MATURITY}" # Maturity
|
|
- "${DEPTHAI_DEVICE_SIDE_COMMIT}" # commit hash
|
|
- "${DEPTHAI_DEVICE_SIDE_VERSION}" # Optional version
|
|
- )
|
|
- endif()
|
|
- list(APPEND RESOURCE_COMPILED_FILES ${DEPTHAI_RESOURCE_LIST})
|
|
-
|
|
- # Add bootloader
|
|
- DepthaiBootloaderDownload(
|
|
- "${DEPTHAI_BOOTLOADER_SHARED_COMMIT_HASH}" "${DEPTHAI_BOOTLOADER_SHARED_COMMIT_HASH_ENFORCE}"
|
|
- "${DEPTHAI_RESOURCES_OUTPUT_DIR}" # Output folder
|
|
- DEPTHAI_BOOTLOADER_RESOURCE_LIST # List of output resources
|
|
- "${DEPTHAI_BOOTLOADER_MATURITY}" # Maturity
|
|
- "${DEPTHAI_BOOTLOADER_VERSION}" # if maturity == snapshot -> hash else version
|
|
- )
|
|
- list(APPEND RESOURCE_COMPILED_FILES ${DEPTHAI_BOOTLOADER_RESOURCE_LIST})
|
|
-
|
|
+ file(COPY "${DEPTHAI_BOOTLOADER_FWP}" DESTINATION "${DEPTHAI_RESOURCES_OUTPUT_DIR}")
|
|
+ file(COPY "${DEPTHAI_DEVICE_FWP}" DESTINATION "${DEPTHAI_RESOURCES_OUTPUT_DIR}")
|
|
+ file(GLOB RESOURCE_COMPILED_FILES "${DEPTHAI_RESOURCES_OUTPUT_DIR}/*.tar.xz")
|
|
message(STATUS "LIST OF RESOURCE COMPILED FILES: ${RESOURCE_COMPILED_FILES}")
|
|
|
|
# Add RC and resource compile the binares
|