3rdParty-devel: Add rhash
This is a 0-clause BSD-licensed, tiny hash library written in C and widely available on both POSIX and Windows systems. git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9539 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 2bdfd5a8b16647266a18c55e870b0013e948d08d Former-commit-id: d56649b829919db5d7bd0774f25560ffd822185c
This commit is contained in:
parent
3185eb2d02
commit
5e72503eb1
3 changed files with 46 additions and 0 deletions
|
@ -116,6 +116,7 @@ option(OPTION_GLM "Download and install GLM math headers" true)
|
|||
option(OPTION_TINYGLTF "Download and Build TinyGLTF" true)
|
||||
option(OPTION_MINIZIP "Download and Build minizip" true)
|
||||
option(OPTION_CJSON "Download and Build cjson" true)
|
||||
option(OPTION_RHASH "Download and Build rhash" true)
|
||||
option(OPTION_CACHED_ARCHIVES "Download from a defined cache" false)
|
||||
|
||||
set(CACHED_URL "" CACHE STRING "Preferred url from which to download")
|
||||
|
@ -145,6 +146,7 @@ if(OPTION_CACHED_ARCHIVES)
|
|||
set(TINYGLTF_URL "${CACHED_URL}/${TINYGLTF_FILE}")
|
||||
set(MINIZIP_URL "${CACHED_URL}/${MINIZIP_FILE}")
|
||||
set(CJSON_URL "${CACHED_URL}/${CJSON_FILE}")
|
||||
set(RHASH_URL "${CACHED_URL}/${RHASH_FILE}")
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -580,6 +582,28 @@ else(OPTION_CJSON)
|
|||
set(CJSON_PROJECT )
|
||||
endif(OPTION_CJSON)
|
||||
|
||||
if(OPTION_RHASH)
|
||||
set(RHASH_ARGS ${EXTERNALS_CMAKE_ARGS} -D CMAKE_DEBUG_POSTFIX='')
|
||||
ExternalProject_Add(${RHASH_PROJECT}
|
||||
URL ${RHASH_URL}
|
||||
URL_HASH ${RHASH_HASH}
|
||||
BINARY_DIR
|
||||
# rhash does not support out-of-tree builds.
|
||||
${EXTERNALS_PREFIX}/Source/${RHASH_PROJECT}
|
||||
CONFIGURE_COMMAND
|
||||
./configure
|
||||
--prefix=${EXTERNALS_INSTALL_DIR}
|
||||
--cc=${CMAKE_C_COMPILER}
|
||||
--enable-lib-shared
|
||||
--disable-lib-static
|
||||
BUILD_COMMAND
|
||||
make lib-shared LIBRHASH_SHARED=librhash.dll
|
||||
INSTALL_COMMAND
|
||||
make install-lib-shared LIBRHASH_SHARED=librhash.dll
|
||||
)
|
||||
else(OPTION_RHASH)
|
||||
set(RHASH_PROJECT )
|
||||
endif(OPTION_RHASH)
|
||||
|
||||
# no-output target, for having some files available in IDEs.
|
||||
set(DOCSOURCES COPYING LICENSE readme.txt)
|
||||
|
|
15
packaging/3rdParty-devel/Licenses/rhash/COPYING
Normal file
15
packaging/3rdParty-devel/Licenses/rhash/COPYING
Normal file
|
@ -0,0 +1,15 @@
|
|||
|
||||
BSD Zero Clause License
|
||||
|
||||
Copyright (c) 2005, Aleksey Kravchenko <rhash.admin@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
|
@ -235,3 +235,10 @@ set(CJSON_PROJECT cjson-${CJSON_VERSION})
|
|||
set(CJSON_FILE ${CJSON_PROJECT}.tar.gz)
|
||||
set(CJSON_URL https://github.com/DaveGamble/cJSON/archive/refs/tags/v${CJSON_VERSION}.tar.gz)
|
||||
set(CJSON_HASH SHA256=3aa806844a03442c00769b83e99970be70fbef03735ff898f4811dd03b9f5ee5)
|
||||
|
||||
# rhash
|
||||
set(RHASH_VERSION 1.4.4)
|
||||
set(RHASH_PROJECT rhash-${RHASH_VERSION})
|
||||
set(RHASH_FILE ${RHASH_PROJECT}-src.tar.gz)
|
||||
set(RHASH_URL https://deac-riga.dl.sourceforge.net/project/rhash/rhash/${RHASH_VERSION}/${RHASH_FILE}?viasf=1)
|
||||
set(RHASH_HASH SHA256=8e7d1a8ccac0143c8fe9b68ebac67d485df119ea17a613f4038cda52f84ef52a)
|
||||
|
|
Loading…
Reference in a new issue