2017-02-28 23:49:04 +00:00
|
|
|
option (USE_INTERNAL_ZSTD_LIBRARY "Set to FALSE to use system zstd library instead of bundled" ${NOT_UNBUNDLED})
|
|
|
|
|
|
|
|
if (NOT USE_INTERNAL_ZSTD_LIBRARY)
|
2017-04-01 07:20:54 +00:00
|
|
|
find_library (ZSTD_LIBRARY zstd)
|
|
|
|
find_path (ZSTD_INCLUDE_DIR NAMES zstd.h PATHS ${ZSTD_INCLUDE_PATHS})
|
2017-02-28 23:49:04 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (ZSTD_LIBRARY AND ZSTD_INCLUDE_DIR)
|
2017-04-01 07:20:54 +00:00
|
|
|
include_directories (${ZSTD_INCLUDE_DIR})
|
2017-02-28 23:49:04 +00:00
|
|
|
else ()
|
2017-04-01 07:20:54 +00:00
|
|
|
set (USE_INTERNAL_ZSTD_LIBRARY 1)
|
|
|
|
set (ZSTD_LIBRARY zstd)
|
2017-02-28 23:49:04 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
message (STATUS "Using zstd: ${ZSTD_INCLUDE_DIR} : ${ZSTD_LIBRARY}")
|