-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
62 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Try to find the zstd library | ||
# | ||
# If successful, the following variables will be defined: | ||
# zstd_INCLUDE_DIR | ||
# zstd_LIBRARY | ||
# zstd_STATIC_LIBRARY | ||
# zstd_FOUND | ||
# | ||
# Additionally, one of the following import targets will be defined: | ||
# zstd::libzstd_static | ||
if(MSVC) | ||
set(zstd_STATIC_LIBRARY_SUFFIX "_static\\${CMAKE_STATIC_LIBRARY_SUFFIX}$") | ||
else() | ||
set(zstd_STATIC_LIBRARY_SUFFIX "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$") | ||
endif() | ||
|
||
find_path(zstd_INCLUDE_DIR NAMES zstd.h) | ||
find_library(zstd_LIBRARY NAMES zstd zstd_static) | ||
find_library(zstd_STATIC_LIBRARY NAMES zstd_static | ||
"${CMAKE_STATIC_LIBRARY_PREFIX}zstd${CMAKE_STATIC_LIBRARY_SUFFIX}") | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args( | ||
zstd DEFAULT_MSG | ||
zstd_LIBRARY zstd_INCLUDE_DIR | ||
) | ||
|
||
if(zstd_FOUND) | ||
message(STATUS "Found zstd_LIBRARY: ${zstd_LIBRARY}") | ||
message(STATUS "Found zstd_STATIC_LIBRARY: ${zstd_STATIC_LIBRARY}") | ||
message(STATUS "Found zstd_INCLUDE_DIR: ${zstd_INCLUDE_DIR}") | ||
if(zstd_STATIC_LIBRARY MATCHES "${zstd_STATIC_LIBRARY_SUFFIX}$" AND | ||
NOT TARGET zstd::libzstd_static) | ||
message(STATUS "-- zstd_LIBRARY: ${zstd_LIBRARY}") | ||
message(STATUS "-- zstd_STATIC_LIBRARY: ${zstd_STATIC_LIBRARY}") | ||
message(STATUS "-- zstd_INCLUDE_DIR: ${zstd_INCLUDE_DIR}") | ||
add_library(zstd::libzstd_static STATIC IMPORTED) | ||
set_target_properties(zstd::libzstd_static PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES "${zstd_INCLUDE_DIR}" | ||
IMPORTED_LOCATION "${zstd_STATIC_LIBRARY}") | ||
add_library(zstd::libzstd_shared SHARED IMPORTED) | ||
endif() | ||
endif() | ||
|
||
unset(zstd_STATIC_LIBRARY_SUFFIX) | ||
|
||
mark_as_advanced(zstd_INCLUDE_DIR zstd_LIBRARY zstd_STATIC_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,7 @@ | |
# under the License. | ||
|
||
python: | ||
- 3.6 | ||
- 3.7 | ||
- 3.8 | ||
- 3.11 | ||
|
||
cuda: | ||
- False |