File: FindZstd.cmake

package info (click to toggle)
apt 1.8.2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 19,680 kB
  • sloc: cpp: 67,708; sh: 24,865; xml: 5,187; perl: 577; ansic: 190; makefile: 28; python: 28
file content (25 lines) | stat: -rw-r--r-- 581 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# - Try to find ZSTD
# Once done, this will define
#
#  ZSTD_FOUND - system has ZSTD
#  ZSTD_INCLUDE_DIRS - the ZSTD include directories
#  ZSTD_LIBRARIES - the ZSTD library
find_package(PkgConfig)

pkg_check_modules(ZSTD_PKGCONF libzstd)

find_path(ZSTD_INCLUDE_DIRS
  NAMES zstd.h
  PATHS ${ZSTD_PKGCONF_INCLUDE_DIRS}
)


find_library(ZSTD_LIBRARIES
  NAMES zstd
  PATHS ${ZSTD_PKGCONF_LIBRARY_DIRS}
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ZSTD DEFAULT_MSG ZSTD_INCLUDE_DIRS ZSTD_LIBRARIES)

mark_as_advanced(ZSTD_INCLUDE_DIRS ZSTD_LIBRARIES)