From dcee781ae8e7be91ac7d2b646d33304857a2c542 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 14 Dec 2013 15:46:11 -0800 Subject: [PATCH] Add CityHash back to Linux/iOS/etc. This reverts commit ecfe43c1493d6cfec4e4af99f74ea7d286cf33de. --- CMakeLists.txt | 9 ++++++++- Qt/Native.pro | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b905335103..93b6528241 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -491,6 +491,12 @@ else() set(ZLIB_LIBRARY zlib) endif() +add_library(cityhash STATIC + native/ext/cityhash/city.cpp + native/ext/cityhash/city.h + native/ext/cityhash/citycrc.h +) +include_directories(ext/cityhash) add_library(libzip STATIC native/ext/libzip/zip.h @@ -1143,7 +1149,7 @@ add_library(${CoreLibName} ${CoreLinkType} $ Globals.h git-version.cpp) -target_link_libraries(${CoreLibName} Common native kirk xbrz xxhash +target_link_libraries(${CoreLibName} Common native kirk cityhash xbrz xxhash ${CoreExtraLibs} ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES}) setup_target_project(${CoreLibName} Core) @@ -1368,6 +1374,7 @@ if(APPLE) set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -D_NDEBUG") # These can be fast even for debug. + set_target_properties(cityhash PROPERTIES COMPILE_FLAGS "-O3") set_target_properties(snappy PROPERTIES COMPILE_FLAGS "-O3") if(NOT ZLIB_FOUND) set_target_properties(zlib PROPERTIES COMPILE_FLAGS "-O3") diff --git a/Qt/Native.pro b/Qt/Native.pro index 1d54cc26f1..4c478e5543 100755 --- a/Qt/Native.pro +++ b/Qt/Native.pro @@ -23,6 +23,12 @@ SOURCES += $$P/native/ext/rg_etc1/rg_etc1.cpp HEADERS += $$P/native/ext/rg_etc1/rg_etc1.h INCLUDEPATH += $$P/native/ext/rg_etc1 +# Cityhash + +SOURCES += ../native/ext/cityhash/city.cpp +HEADERS += ../native/ext/cityhash/*.h +INCLUDEPATH += ../native/ext/cityhash + # JPGE SOURCES += $$P/native/ext/jpge/*.cpp HEADERS += $$P/native/ext/jpge/*.h