You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.2 KiB

  1. # Copyright (c) Meta Platforms, Inc. and affiliates.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. #
  15. # - Try to find Facebook zstd library
  16. # This will define
  17. # ZSTD_FOUND
  18. # ZSTD_INCLUDE_DIR
  19. # ZSTD_LIBRARY
  20. #
  21. find_path(ZSTD_INCLUDE_DIR NAMES zstd.h)
  22. find_library(ZSTD_LIBRARY_DEBUG NAMES zstdd zstd_staticd)
  23. find_library(ZSTD_LIBRARY_RELEASE NAMES zstd zstd_static)
  24. include(SelectLibraryConfigurations)
  25. SELECT_LIBRARY_CONFIGURATIONS(ZSTD)
  26. include(FindPackageHandleStandardArgs)
  27. FIND_PACKAGE_HANDLE_STANDARD_ARGS(
  28. ZSTD DEFAULT_MSG
  29. ZSTD_LIBRARY ZSTD_INCLUDE_DIR
  30. )
  31. if (ZSTD_FOUND)
  32. message(STATUS "Found Zstd: ${ZSTD_LIBRARY}")
  33. endif()
  34. mark_as_advanced(ZSTD_INCLUDE_DIR ZSTD_LIBRARY)