| 521 | #endif // COLMAP_DOWNLOAD_ENABLED |
| 522 | |
| 523 | std::filesystem::path MaybeDownloadAndCacheFile(const std::string& uri) { |
| 524 | if (!IsURI(uri)) { |
| 525 | return uri; |
| 526 | } |
| 527 | #ifdef COLMAP_DOWNLOAD_ENABLED |
| 528 | return DownloadAndCacheFile(uri); |
| 529 | #else |
| 530 | throw std::runtime_error("COLMAP was compiled without download support"); |
| 531 | #endif |
| 532 | } |
| 533 | |
| 534 | } // namespace colmap |