add FindLibcuckoo module and instructions for dropping in libcuckoo

This commit is contained in:
Stephen Birarda 2014-11-05 10:57:06 -08:00
parent 7e36c51edc
commit 874ccf0708
4 changed files with 51 additions and 1 deletions

4
.gitignore vendored
View file

@ -32,5 +32,9 @@ DerivedData
interface/external/*/*
!interface/external/*/readme.txt
# ignore libraries externals
libraries/*/externals/*/*
!libraries/*/externals/*/readme.txt
# Ignore interfaceCache for Linux users
interface/interfaceCache/

View file

@ -0,0 +1,29 @@
# FindLibCuckoo.cmake
#
# Try to find libcuckoo.
#
# You can provide a LIBCUCKOO_ROOT_DIR which contains src and include directories
#
# Once done this will define
#
# LIBCUCKOO_FOUND - system found libcuckoo
# LIBCUCKOO_INCLUDE_DIRS - the libcuckoo include directory
#
# Created on 5/11/2014 by Stephen Birarda
# Copyright 2014 High Fidelity, Inc.
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
hifi_library_search_hints("libcuckoo")
find_path(LIBCUCKOO_INCLUDE_DIRS cuckoohash_map.hh PATH_SUFFIXES libcuckoo HINTS ${LIBCUCKOO_SEARCH_DIRS})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
libcuckoo
"Could NOT find libcuckoo. Read libraries/networking/externals/libcuckoo/readme.txt"
LIBCUCKOO_INCLUDE_DIRS
)

View file

@ -10,9 +10,12 @@ if (WIN32)
target_link_libraries(${TARGET_NAME} ws2_32.lib)
endif ()
# find OpenSSL
# find required dependencies
find_package(OpenSSL REQUIRED)
list(APPEND LIBCUCKOO_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/externals/libcuckoo")
find_package(libcuckoo REQUIRED)
if (APPLE AND ${OPENSSL_INCLUDE_DIR} STREQUAL "/usr/include")
# this is a user on OS X using system OpenSSL, which is going to throw warnings since they're deprecating for their common crypto
message(WARNING "The found version of OpenSSL is the OS X system version. This will produce deprecation warnings."

View file

@ -0,0 +1,14 @@
Instructions for adding the libcuckoo library to Interface
Stephen Birarda, November 5, 2014
1. Download the libcuckoo ZIP from the High Fidelity libcuckoo fork on Github.
https://github.com/highfidelity/libcuckoo/archive/master.zip
2. Copy the libcuckoo folder from inside the ZIP to libraries/networking/externals/libcuckoo/.
You should have the following structure:
libraries/networking/externals/libcuckoo/libcuckoo/cuckoohash_map.hh
3. Delete your build directory, run cmake and build, and you should be all set.