2019-06-20 02:58:25 +03:00
|
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
2019-02-15 08:33:50 +03:00
|
|
|
#
|
2019-06-20 02:58:25 +03:00
|
|
|
# This software may be used and distributed according to the terms of the
|
|
|
|
# GNU General Public License version 2.
|
2019-02-15 08:33:50 +03:00
|
|
|
|
|
|
|
find_path(LZ4_INCLUDE_DIR NAMES lz4.h)
|
|
|
|
|
|
|
|
find_library(LZ4_LIBRARY_DEBUG NAMES lz4d)
|
|
|
|
find_library(LZ4_LIBRARY_RELEASE NAMES lz4)
|
|
|
|
|
|
|
|
include(SelectLibraryConfigurations)
|
2019-07-24 04:34:13 +03:00
|
|
|
select_library_configurations(LZ4)
|
2019-02-15 08:33:50 +03:00
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
2019-07-24 04:34:13 +03:00
|
|
|
find_package_handle_standard_args(
|
2019-02-15 08:33:50 +03:00
|
|
|
LZ4 DEFAULT_MSG
|
|
|
|
LZ4_LIBRARY LZ4_INCLUDE_DIR
|
|
|
|
)
|
|
|
|
|
2019-11-22 23:53:41 +03:00
|
|
|
if(LZ4_FOUND)
|
|
|
|
add_library(LZ4::lz4 UNKNOWN IMPORTED)
|
|
|
|
set_target_properties(
|
|
|
|
LZ4::lz4 PROPERTIES
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${LZ4_INCLUDE_DIR}"
|
|
|
|
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
|
|
|
IMPORTED_LOCATION "${LZ4_LIBRARY}"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-02-15 08:33:50 +03:00
|
|
|
mark_as_advanced(LZ4_INCLUDE_DIR LZ4_LIBRARY)
|