Changeset View
Changeset View
Standalone View
Standalone View
files/system-zstd.patch
- This file was added.
| --- a/cmake/Dependencies.cmake | |||||
| +++ b/cmake/Dependencies.cmake | |||||
| @@ -1365,10 +1365,13 @@ if(NOT INTERN_BUILD_MOBILE AND BUILD_CAF | |||||
| endif() | |||||
| if(USE_ZSTD) | |||||
| - list(APPEND Caffe2_DEPENDENCY_LIBS libzstd_static) | |||||
| - include_directories(SYSTEM ${CMAKE_CURRENT_LIST_DIR}/../third_party/zstd/lib) | |||||
| - add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/zstd/build/cmake) | |||||
| - set_property(TARGET libzstd_static PROPERTY POSITION_INDEPENDENT_CODE ON) | |||||
| + find_library(LIBZSTD zstd) | |||||
| + if(LIBZSTD) | |||||
| + find_path(ZSTD_INCLUDE_DIR NAMES zdict.h zstd.h zstd_errors.h ONLY_CMAKE_FIND_ROOT_PATH) | |||||
| + if(ZSTD_INCLUDE_DIR) | |||||
| + list(APPEND Caffe2_PUBLIC_DEPENDENCY_LIBS ${LIBZSTD}) | |||||
| + endif() | |||||
| + endif() | |||||
| endif() | |||||
| # ---[ Onnx | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.