Add CityHash 1.1.0 wrap definition

1.1.0
Mahmoud Al-Qudsi 2018-06-24 15:43:47 -05:00
parent fa9bba7079
commit 2c73c911cf
3 changed files with 43 additions and 0 deletions

@ -0,0 +1,24 @@
conf = configuration_data()
cc = meson.get_compiler('cpp')
if cc.links('int main(){if(__builtin_expect(1<0,0)){}}', name: '__builtin_expect')
conf.set('HAVE_BUILTIN_EXPECT', 1)
endif
foreach include : ['dlfcn', 'inttypes', 'memory', 'stdint', 'stdlib', 'strings', 'string', 'sys/stat', 'sys/types', 'unistd']
conf.set10('HAVE_' + include.underscorify().to_upper() + '_H', cc.has_header(include + '.h'))
endforeach
# use stdio.h as a proxy for all ANSI C header files
conf.set('STDC_HEADERS', cc.has_header('stdio.h'))
if build_machine.endian() == 'big'
conf.set('WORDS_BIGENDIAN', 1)
endif
if not cc.links('inline void foo() {} int main() { foo(); }', name: 'inline')
conf.set('inline', '')
endif
configure_file(output: 'config.h', configuration: conf)

@ -0,0 +1,15 @@
project('cityhash', ['cpp'], license: 'MIT')
subdir('internal')
sources = ['src/city.cc']
inc_dir = include_directories('src/')
cityhash = library('cityhash', 'src/city.cc',
include_directories: [
inc_dir,
include_directories('internal')
])
cityhash = declare_dependency(
link_with: [cityhash],
include_directories: [inc_dir])

@ -0,0 +1,4 @@
[wrap-git]
directory = cityhash-1.1.0
url = https://google.com/cityhash.git
revision = 8af9b8c