diff --git a/extdep/CMakeLists.txt b/extdep/CMakeLists.txt index 642e10eee..8f38cd1bf 100644 --- a/extdep/CMakeLists.txt +++ b/extdep/CMakeLists.txt @@ -34,7 +34,8 @@ else() eth_download(json-rpc-cpp VERSION 0.3.2) eth_download(qt) eth_download(cryptopp) - eth_download(snappy) + eth_download(snappy + OSX_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/scripts/snappy_osx.sh) eth_download(leveldb) #include(compile/leveldb.cmake) diff --git a/extdep/eth_download.cmake b/extdep/eth_download.cmake index 1567eafaa..0b4d6b6fb 100644 --- a/extdep/eth_download.cmake +++ b/extdep/eth_download.cmake @@ -48,6 +48,8 @@ macro(eth_download eth_package_name) if (eth_package_install) message(STATUS "install script is at: ${eth_package_install}") + else () + set (eth_package_install echo 0) # cause empty string is not handled properly endif() ExternalProject_Add(${eth_package_name} @@ -55,7 +57,7 @@ macro(eth_download eth_package_name) BINARY_DIR ${eth_package_name}-prefix/src/${eth_package_name} CONFIGURE_COMMAND "" BUILD_COMMAND ${eth_package_copy} - INSTALL_COMMAND ${eth_package_install} + INSTALL_COMMAND ${eth_package_install} . ${ETH_DEPENDENCY_INSTALL_DIR} ) endmacro() diff --git a/extdep/scripts/snappy_osx.sh b/extdep/scripts/snappy_osx.sh new file mode 100755 index 000000000..01304fcf1 --- /dev/null +++ b/extdep/scripts/snappy_osx.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +ETH_DEPENDENCY_SOURCE_DIR=$1 +ETH_DEPENDENCY_INSTALL_DIR=$2 + +SNAPPY_DYLIB=${ETH_DEPENDENCY_INSTALL_DIR}/lib/libsnappy.dylib +install_name_tool -id ${SNAPPY_DYLIB} ${SNAPPY_DYLIB} +