Skip to content

Commit

Permalink
Fixing SSL discovery for macos
Browse files Browse the repository at this point in the history
Summary:
plus doc update
Closes #103

Reviewed By: nikunjy

Differential Revision: D2706184

Pulled By: ldemailly

fb-gh-sync-id: 79f2d51a37eee58f7898847c058e640130860760
  • Loading branch information
ldemailly committed Dec 1, 2015
1 parent c2a16bf commit 62b7add
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,17 @@ find_library(GLOG_LIBRARY glog)
# Gflags
find_path(GFLAGS_INCLUDE_DIR gflags/gflags.h)
find_library(GFLAGS_LIBRARY gflags)
find_library(CRYPTO_LIBRARY crypto)
# OpenSSL's crypto lib
find_package(OpenSSL REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})

# You can also add jemalloc to the list if you have it/want it
target_link_libraries(wdtlib_min
folly4wdt
${GLOG_LIBRARY}
${GFLAGS_LIBRARY}
${Boost_LIBRARIES}
${CRYPTO_LIBRARY}
${OPENSSL_CRYPTO_LIBRARY}
${CMAKE_THREAD_LIBS_INIT} # Must be last to avoid link errors
)

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ glog (google logging library)
Parts of Facebook's Folly open source library (as set in the CMakefile)
Mostly conv, threadlocal and checksum support.

For encryption, the crypto lib part of openssl-1.x

You can build and embed wdt as a library with as little as a C++11 compiler
and glog - and you could macro away glog or replace it by printing to stderr if
needed.
Expand Down
11 changes: 11 additions & 0 deletions build/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ If using a vmware image/starting fresh
```
sudo vmware-config-tools.pl # to setup shared folders
```

openssl should already be there but may need update to 1.0.x

# Build Instructions
__Install Cmake 3.2 or greater.__
*See directions below for Mac
Expand Down Expand Up @@ -119,6 +122,14 @@ git clone https://github.com/floitsch/double-conversion.git
cd double-conversion; cmake . ; make -j && sudo make install;
cd ../
```

__libcrypto from openssl-1.0.x__

```
brew update openssl
```


__Build wdt from source__

Get folly source for use during build
Expand Down
4 changes: 4 additions & 0 deletions build/travis_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ date
uname -a
echo $HOSTNAME
mkdir $HOME/bin || true
brew update
brew install openssl || true
brew link --force openssl || true
openssl version -a
CMAKE_BASE=cmake-3.3.2-Darwin-x86_64
cd ..
CMAKE_BIN_DIR=`pwd`/$CMAKE_BASE/CMake.app/Contents/bin
Expand Down

0 comments on commit 62b7add

Please sign in to comment.