Merge pull request #177 from Cyan4973/dev
v0.7.0
diff --git a/cmake_unofficial/CMakeLists.txt b/cmake_unofficial/CMakeLists.txt
index f66e72e..71398d9 100644
--- a/cmake_unofficial/CMakeLists.txt
+++ b/cmake_unofficial/CMakeLists.txt
@@ -20,6 +20,7 @@
option(BUILD_XXHSUM "Build the xxhsum binary" ON)
option(BUILD_SHARED_LIBS "Build shared library" ON)
+option(BUILD_ENABLE_INLINE_API "add xxhash.c to includes for -DXXH_INLINE_ALL" ON)
if("${CMAKE_VERSION}" VERSION_LESS "3.0")
project(XXHASH C)
@@ -98,6 +99,10 @@
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
install(FILES "${XXHASH_DIR}/xxhash.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+ if(BUILD_ENABLE_INLINE_API)
+ install(FILES "${XXHASH_DIR}/xxhash.c"
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+ endif()
install(FILES "${XXHASH_DIR}/xxhsum.1"
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
endif(NOT XXHASH_BUNDLED_MODE)
diff --git a/cmake_unofficial/README.md b/cmake_unofficial/README.md
index 4fca58d..153d5ac 100644
--- a/cmake_unofficial/README.md
+++ b/cmake_unofficial/README.md
@@ -4,3 +4,4 @@
- `BUILD_XXHSUM` : build the command line binary. ON by default
- `BUILD_SHARED_LIBS` : build dynamic library. ON by default.
+- `BUILD_ENABLE_INLINE_API` : adds xxhash.c for the `-DXXH_INLINE_ALL` api. ON by default.