|
| 1 | +From c77f3fca85479b6ffb1b9fba9ef9d805adfcadbf Mon Sep 17 00:00:00 2001 |
| 2 | +From: Petr Hodina <phodina@luxonis.com> |
| 3 | +Date: Tue, 20 May 2025 19:09:54 +0200 |
| 4 | +Subject: [PATCH 3/4] Allow offline build |
| 5 | + |
| 6 | + |
| 7 | +diff --git a/cmake/DepthaiDeviceKbDownloader.cmake b/cmake/DepthaiDeviceKbDownloader.cmake |
| 8 | +index 2cd26d535..a22d02d78 100644 |
| 9 | +--- a/cmake/DepthaiDeviceKbDownloader.cmake |
| 10 | ++++ b/cmake/DepthaiDeviceKbDownloader.cmake |
| 11 | +@@ -126,19 +126,19 @@ function(DepthaiDeviceDownloader) |
| 12 | + endif() |
| 13 | + |
| 14 | + # Download firmware package |
| 15 | +- message(STATUS "Downloading and checking ${device_type}-fwp.tar.xz") |
| 16 | +- message(STATUS "Download URL: ${_download_directory_url}/${device_type}-fwp-${_version_commit_identifier}.tar.xz") |
| 17 | +- DownloadAndChecksum( |
| 18 | +- "${_download_directory_url}/${device_type}-fwp-${_version_commit_identifier}.tar.xz" # File |
| 19 | +- "${_download_directory_url}/${device_type}-fwp-${_version_commit_identifier}.tar.xz.sha256" # File checksum |
| 20 | +- "${folder}/${device_type}-fwp-${_version_commit_identifier}.tar.xz" |
| 21 | +- status |
| 22 | +- ) |
| 23 | +- if(${status}) |
| 24 | +- message(STATUS "\nCouldn't download ${device_type}-fwp.tar.xz\n") |
| 25 | +- PrintErrorMessage(${status}) |
| 26 | +- message(FATAL_ERROR "Aborting.\n") |
| 27 | +- endif() |
| 28 | ++ # message(STATUS "Downloading and checking ${device_type}-fwp.tar.xz") |
| 29 | ++ # message(STATUS "Download URL: ${_download_directory_url}/${device_type}-fwp-${_version_commit_identifier}.tar.xz") |
| 30 | ++ # DownloadAndChecksum( |
| 31 | ++ # "${_download_directory_url}/${device_type}-fwp-${_version_commit_identifier}.tar.xz" # File |
| 32 | ++ # "${_download_directory_url}/${device_type}-fwp-${_version_commit_identifier}.tar.xz.sha256" # File checksum |
| 33 | ++ # "${folder}/${device_type}-fwp-${_version_commit_identifier}.tar.xz" |
| 34 | ++ # status |
| 35 | ++ # ) |
| 36 | ++ # if(${status}) |
| 37 | ++ # message(STATUS "\nCouldn't download ${device_type}-fwp.tar.xz\n") |
| 38 | ++ # PrintErrorMessage(${status}) |
| 39 | ++ # message(FATAL_ERROR "Aborting.\n") |
| 40 | ++ # endif() |
| 41 | + # add depthai-device-kb-fwp.tar.xz to list |
| 42 | + list(APPEND "${output_list_var}" "${folder}/${device_type}-fwp-${_version_commit_identifier}.tar.xz") |
| 43 | + |
| 44 | +diff --git a/cmake/DepthaiDownloader.cmake b/cmake/DepthaiDownloader.cmake |
| 45 | +index 66d555e5c..77563d279 100644 |
| 46 | +--- a/cmake/DepthaiDownloader.cmake |
| 47 | ++++ b/cmake/DepthaiDownloader.cmake |
| 48 | +@@ -142,18 +142,18 @@ function(DepthaiDownload) |
| 49 | + |
| 50 | + |
| 51 | + # Download depthai-device firmware package |
| 52 | +- message(STATUS "Downloading and checking depthai-device-fwp.tar.xz") |
| 53 | +- DownloadAndChecksum( |
| 54 | +- "${_download_directory_url}/depthai-device-fwp-${_version_commit_identifier}.tar.xz" # File |
| 55 | +- "${_download_directory_url}/depthai-device-fwp-${_version_commit_identifier}.tar.xz.sha256" # File checksum |
| 56 | +- "${folder}/depthai-device-fwp-${_version_commit_identifier}.tar.xz" |
| 57 | +- status |
| 58 | +- ) |
| 59 | +- if(${status}) |
| 60 | +- message(STATUS "\nCouldn't download depthai-device-fwp.tar.xz\n") |
| 61 | +- PrintErrorMessage(${status}) |
| 62 | +- message(FATAL_ERROR "Aborting.\n") |
| 63 | +- endif() |
| 64 | ++ # message(STATUS "Downloading and checking depthai-device-fwp.tar.xz") |
| 65 | ++ # DownloadAndChecksum( |
| 66 | ++ # "${_download_directory_url}/depthai-device-fwp-${_version_commit_identifier}.tar.xz" # File |
| 67 | ++ # "${_download_directory_url}/depthai-device-fwp-${_version_commit_identifier}.tar.xz.sha256" # File checksum |
| 68 | ++ # "${folder}/depthai-device-fwp-${_version_commit_identifier}.tar.xz" |
| 69 | ++ # status |
| 70 | ++ # ) |
| 71 | ++ # if(${status}) |
| 72 | ++ # message(STATUS "\nCouldn't download depthai-device-fwp.tar.xz\n") |
| 73 | ++ # PrintErrorMessage(${status}) |
| 74 | ++ # message(FATAL_ERROR "Aborting.\n") |
| 75 | ++ # endif() |
| 76 | + # add depthai-device-fwp.tar.xz to list |
| 77 | + list(APPEND "${output_list_var}" "${folder}/depthai-device-fwp-${_version_commit_identifier}.tar.xz") |
| 78 | + |
| 79 | +@@ -252,4 +252,4 @@ function(DepthaiLocal patch_only patch_only_on_off output_dir output_list_var pa |
| 80 | + |
| 81 | + set("${output_list_var}" "${_resource_list}" PARENT_SCOPE) |
| 82 | + |
| 83 | +-endfunction() |
| 84 | +\ No newline at end of file |
| 85 | ++endfunction() |
| 86 | +diff --git a/cmake/DepthaiVisualizerDownloader.cmake b/cmake/DepthaiVisualizerDownloader.cmake |
| 87 | +index b8300968a..e747bb729 100644 |
| 88 | +--- a/cmake/DepthaiVisualizerDownloader.cmake |
| 89 | ++++ b/cmake/DepthaiVisualizerDownloader.cmake |
| 90 | +@@ -37,18 +37,18 @@ function(DepthaiVisualizerDownloader) |
| 91 | + |
| 92 | + |
| 93 | + # Download firmware package |
| 94 | +- message(STATUS "Downloading and checking ${device_type}-fwp.tar.xz") |
| 95 | +- DownloadAndChecksum( |
| 96 | +- "${_download_directory_url}/${visualizer_hash}/depthai-visualizer-${visualizer_hash}.tar.xz" # File |
| 97 | +- "${_download_directory_url}/${visualizer_hash}/depthai-visualizer-${visualizer_hash}.tar.xz.sha256" # File checksum |
| 98 | +- "${folder}/depthai-visualizer-${visualizer_hash}.tar.xz" |
| 99 | +- status |
| 100 | +- ) |
| 101 | +- if(${status}) |
| 102 | +- message(STATUS "\nCouldn't download depthai-visualizer static files\n") |
| 103 | +- PrintErrorMessage(${status}) |
| 104 | +- message(FATAL_ERROR "Aborting.\n") |
| 105 | +- endif() |
| 106 | ++ #message(STATUS "Downloading and checking ${device_type}-fwp.tar.xz") |
| 107 | ++ #DownloadAndChecksum( |
| 108 | ++ # "${_download_directory_url}/${visualizer_hash}/depthai-visualizer-${visualizer_hash}.tar.xz" # File |
| 109 | ++ # "${_download_directory_url}/${visualizer_hash}/depthai-visualizer-${visualizer_hash}.tar.xz.sha256" # File checksum |
| 110 | ++ # "${folder}/depthai-visualizer-${visualizer_hash}.tar.xz" |
| 111 | ++ # status |
| 112 | ++ #) |
| 113 | ++ #if(${status}) |
| 114 | ++ # message(STATUS "\nCouldn't download depthai-visualizer static files\n") |
| 115 | ++ # PrintErrorMessage(${status}) |
| 116 | ++ # message(FATAL_ERROR "Aborting.\n") |
| 117 | ++ #endif() |
| 118 | + # add depthai-device-kb-fwp.tar.xz to list |
| 119 | + list(APPEND "${output_list_var}" "${folder}/depthai-visualizer-${visualizer_hash}.tar.xz") |
| 120 | + |
| 121 | +diff --git a/cmake/depthaiDependencies.cmake b/cmake/depthaiDependencies.cmake |
| 122 | +index e9b82e262..b224fdd29 100644 |
| 123 | +--- a/cmake/depthaiDependencies.cmake |
| 124 | ++++ b/cmake/depthaiDependencies.cmake |
| 125 | +@@ -174,19 +174,20 @@ endif() |
| 126 | + if(DEPTHAI_XLINK_LOCAL AND (NOT CONFIG_MODE)) |
| 127 | + add_subdirectory("${DEPTHAI_XLINK_LOCAL}" ${CMAKE_CURRENT_BINARY_DIR}/XLink) |
| 128 | + else() |
| 129 | +- FetchContent_Declare( |
| 130 | +- XLink |
| 131 | +- GIT_REPOSITORY https://github.com/luxonis/XLink.git |
| 132 | +- GIT_TAG 87785828fabdb1718760bb0a044405d5bbfbb3a2 |
| 133 | +- ) |
| 134 | + |
| 135 | +- FetchContent_MakeAvailable( |
| 136 | +- XLink |
| 137 | +- ) |
| 138 | ++# FetchContent_Declare( |
| 139 | ++# XLink |
| 140 | ++# GIT_REPOSITORY https://github.com/luxonis/XLink.git |
| 141 | ++# GIT_TAG 87785828fabdb1718760bb0a044405d5bbfbb3a2 |
| 142 | ++# ) |
| 143 | ++# |
| 144 | ++# FetchContent_MakeAvailable( |
| 145 | ++# XLink |
| 146 | ++# ) |
| 147 | + endif() |
| 148 | + set(BUILD_SHARED_LIBS "${_BUILD_SHARED_LIBS_SAVED}") |
| 149 | + unset(_BUILD_SHARED_LIBS_SAVED) |
| 150 | +-list(APPEND targets_to_export XLinkPublic) |
| 151 | ++#list(APPEND targets_to_export XLinkPublic) |
| 152 | + |
| 153 | + # OpenCV 4 - (optional) |
| 154 | + message("DEPTHAI_OPENCV_SUPPORT: ${DEPTHAI_OPENCV_SUPPORT}") |
| 155 | +-- |
| 156 | +2.47.2 |
| 157 | + |
0 commit comments