Browse Source

cryptopp msbuild

cl-refactor
debris 10 years ago
parent
commit
e29befcb96
  1. 5
      extdep/CMakeLists.txt
  2. 25
      extdep/cryptopp.cmake

5
extdep/CMakeLists.txt

@ -6,11 +6,12 @@ include(ExternalProject)
# all dependencies will be installed into this directory, separated by platform # all dependencies will be installed into this directory, separated by platform
string(TOLOWER ${CMAKE_SYSTEM_NAME} _system_name) string(TOLOWER ${CMAKE_SYSTEM_NAME} _system_name)
set(ETH_DEPENDENCY_INSTALL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/install/${_system_name}") set(ETH_DEPENDENCY_INSTALL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/install/${_system_name}")
file(MAKE_DIRECTORY ${ETH_DEPENDENCY_INSTALL_DIR}) file(MAKE_DIRECTORY ${ETH_DEPENDENCY_INSTALL_DIR}/lib)
file(MAKE_DIRECTORY ${ETH_DEPENDENCY_INSTALL_DIR}/include)
include(cryptopp.cmake) include(cryptopp.cmake)
# will be re-eanbled later # will be re-eanbled later
# include(curl.cmake) # include(curl.cmake)
include(json-rpc-cpp.cmake) #include(json-rpc-cpp.cmake)
#include(miniupnpc.cmake) #include(miniupnpc.cmake)

25
extdep/cryptopp.cmake

@ -3,12 +3,23 @@
# TODO the OS X build throws a lot of warnings, but compiles fine # TODO the OS X build throws a lot of warnings, but compiles fine
if(APPLE) if(APPLE)
ExternalProject_Add(cryptopp ExternalProject_Add(cryptopp
URL https://downloads.sourceforge.net/project/cryptopp/cryptopp/5.6.2/cryptopp562.zip URL https://downloads.sourceforge.net/project/cryptopp/cryptopp/5.6.2/cryptopp562.zip
BINARY_DIR cryptopp-prefix/src/cryptopp BINARY_DIR cryptopp-prefix/src/cryptopp
CONFIGURE_COMMAND "" CONFIGURE_COMMAND ""
BUILD_COMMAND make CXX=clang++ CXXFLAGS=-DCRYPTOPP_DISABLE_ASM BUILD_COMMAND make CXX=clang++ CXXFLAGS=-DCRYPTOPP_DISABLE_ASM
INSTALL_COMMAND make install PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} INSTALL_COMMAND make install PREFIX=${ETH_DEPENDENCY_INSTALL_DIR}
) )
elseif(WIN32)
file(MAKE_DIRECTORY ${ETH_DEPENDENCY_INSTALL_DIR}/include/cryptopp)
ExternalProject_Add(cryptopp
SVN_REPOSITORY http://svn.code.sf.net/p/cryptopp/code/trunk/c5
SVN_REVISION -r "541"
BINARY_DIR cryptopp-prefix/src/cryptopp
CONFIGURE_COMMAND devenv cryptest.sln /upgrade
BUILD_COMMAND devenv cryptest.sln /build release
INSTALL_COMMAND cmd /c cp Win32/DLL_Output/Release/cryptopp.dll ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp Win32/DLL_Output/Release/cryptopp.lib ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp *.h ${ETH_DEPENDENCY_INSTALL_DIR}/include/cryptopp
)
# on Linux, the default Makefile does not work. # on Linux, the default Makefile does not work.
else() else()
ExternalProject_Add(cryptopp ExternalProject_Add(cryptopp
@ -17,6 +28,6 @@ else()
CONFIGURE_COMMAND "" CONFIGURE_COMMAND ""
BUILD_COMMAND scons --shared --prefix=${ETH_DEPENDENCY_INSTALL_DIR} BUILD_COMMAND scons --shared --prefix=${ETH_DEPENDENCY_INSTALL_DIR}
INSTALL_COMMAND "" INSTALL_COMMAND ""
) )
endif() endif()

Loading…
Cancel
Save