38 lines
902 B
CMake
38 lines
902 B
CMake
# Find xxHash library
|
|
#
|
|
# This sets the following variables:
|
|
# xxHash_FOUND - True if xxHash was found
|
|
# xxHash_INCLUDE_DIRS - xxHash include directories
|
|
# xxHash_LIBRARIES - xxHash libraries
|
|
|
|
find_path(xxHash_INCLUDE_DIR
|
|
NAMES xxhash.h
|
|
PATHS
|
|
/usr/include
|
|
/usr/local/include
|
|
/opt/local/include
|
|
${CMAKE_INSTALL_PREFIX}/include
|
|
PATH_SUFFIXES xxhash
|
|
)
|
|
|
|
find_library(xxHash_LIBRARY
|
|
NAMES xxhash libxxhash
|
|
PATHS
|
|
/usr/lib
|
|
/usr/local/lib
|
|
/opt/local/lib
|
|
${CMAKE_INSTALL_PREFIX}/lib
|
|
)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(xxHash
|
|
FOUND_VAR xxHash_FOUND
|
|
REQUIRED_VARS xxHash_LIBRARY xxHash_INCLUDE_DIR
|
|
)
|
|
|
|
if(xxHash_FOUND)
|
|
set(xxHash_LIBRARIES ${xxHash_LIBRARY})
|
|
set(xxHash_INCLUDE_DIRS ${xxHash_INCLUDE_DIR})
|
|
endif()
|
|
|
|
mark_as_advanced(xxHash_INCLUDE_DIR xxHash_LIBRARY) |