sapling/CMake/FindLZ4.cmake
Adam Simpkins 2442b46ee8 cmake: always build support for the EdenSCM backing store
Summary:
Now that the fb-mercurial sources are available in the Eden repository, update
our CMake build files to always build them.  This moves the build logic from
the centralized `FBMercurialFeatures.cmake` file into `CMakeLists.txt` files
in the appropriate subdirectories.

Reviewed By: chadaustin

Differential Revision: D18588011

fbshipit-source-id: ded9decde5c2ec766aae0bb0f4f5b021d1044a98
2019-11-22 13:00:07 -08:00

31 lines
797 B
CMake

# Copyright (c) Facebook, Inc. and its affiliates.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2.
find_path(LZ4_INCLUDE_DIR NAMES lz4.h)
find_library(LZ4_LIBRARY_DEBUG NAMES lz4d)
find_library(LZ4_LIBRARY_RELEASE NAMES lz4)
include(SelectLibraryConfigurations)
select_library_configurations(LZ4)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
LZ4 DEFAULT_MSG
LZ4_LIBRARY LZ4_INCLUDE_DIR
)
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()
mark_as_advanced(LZ4_INCLUDE_DIR LZ4_LIBRARY)