Add cmake file
This commit is contained in:
parent
a9b05d2ffa
commit
e6a95e39be
3
.gitignore
vendored
3
.gitignore
vendored
@ -33,7 +33,6 @@ CMakeCache.txt
|
||||
CMakeFiles/
|
||||
cmake_install.cmake
|
||||
Makefile
|
||||
*.cmake
|
||||
|
||||
# IDE specific files
|
||||
.vscode/
|
||||
@ -56,4 +55,4 @@ Thumbs.db
|
||||
|
||||
# Dependencies
|
||||
deps/
|
||||
vendor/
|
||||
vendor/
|
||||
|
38
cmake/FindxxHash.cmake
Normal file
38
cmake/FindxxHash.cmake
Normal file
@ -0,0 +1,38 @@
|
||||
# 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)
|
Loading…
x
Reference in New Issue
Block a user