diff --git a/extdep/CMakeLists.txt b/extdep/CMakeLists.txt index 6c73d3719..7b906058a 100644 --- a/extdep/CMakeLists.txt +++ b/extdep/CMakeLists.txt @@ -5,20 +5,30 @@ include(ExternalProject) # all dependencies will be installed into this directory, separated by platform string(TOLOWER ${CMAKE_SYSTEM_NAME} _system_name) set(ETH_DEPENDENCY_INSTALL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/install/${_system_name}") +set(ETH_DEPENDENCY_SERVER "http://poc-7.ethdev.com/precompiled/${_system_name}") file(MAKE_DIRECTORY ${ETH_DEPENDENCY_INSTALL_DIR}/lib) file(MAKE_DIRECTORY ${ETH_DEPENDENCY_INSTALL_DIR}/include) file(MAKE_DIRECTORY ${ETH_DEPENDENCY_INSTALL_DIR}/bin) -include(icu.cmake) -include(jom.cmake) -include(qt.cmake) -include(curl.cmake) -include(jsoncpp.cmake) -include(argtable2.cmake) -include(json-rpc-cpp.cmake) -include(cryptopp.cmake) -include(snappy.cmake) -include(leveldb.cmake) +if (ETH_COMPILE) + # json-rpc-cpp and its dependencies + include(compile/jsoncpp.cmake) + include(compile/argtable2.cmake) + include(compile/curl.cmake) + include(compile/json-rpc-cpp.cmake) + + # qt at its dependencies + include(compile/icu.cmake) + include(compile/jom.cmake) + include(compile/qt.cmake) + + # leveldb and its dependencies + include(compile/snappy.cmake) + include(compile/leveldb.cmake) + +else() + include(precompiled/json-rpc-cpp.cmake) +endif() # will be re-eanbled later # include(miniupnpc.cmake) diff --git a/extdep/FindCURL.cmake b/extdep/cmake/FindCURL.cmake similarity index 100% rename from extdep/FindCURL.cmake rename to extdep/cmake/FindCURL.cmake diff --git a/extdep/argtable2.cmake b/extdep/compile/argtable2.cmake similarity index 100% rename from extdep/argtable2.cmake rename to extdep/compile/argtable2.cmake diff --git a/extdep/cryptopp.cmake b/extdep/compile/cryptopp.cmake similarity index 100% rename from extdep/cryptopp.cmake rename to extdep/compile/cryptopp.cmake diff --git a/extdep/curl.cmake b/extdep/compile/curl.cmake similarity index 100% rename from extdep/curl.cmake rename to extdep/compile/curl.cmake diff --git a/extdep/icu.cmake b/extdep/compile/icu.cmake similarity index 100% rename from extdep/icu.cmake rename to extdep/compile/icu.cmake diff --git a/extdep/jom.cmake b/extdep/compile/jom.cmake similarity index 100% rename from extdep/jom.cmake rename to extdep/compile/jom.cmake diff --git a/extdep/json-rpc-cpp.cmake b/extdep/compile/json-rpc-cpp.cmake similarity index 86% rename from extdep/json-rpc-cpp.cmake rename to extdep/compile/json-rpc-cpp.cmake index db336f1ac..b4f28a315 100644 --- a/extdep/json-rpc-cpp.cmake +++ b/extdep/compile/json-rpc-cpp.cmake @@ -9,7 +9,7 @@ ExternalProject_Add(json-rpc-cpp GIT_REPOSITORY https://github.com/cinemast/libjson-rpc-cpp.git GIT_TAG v0.3.2 BINARY_DIR json-rpc-cpp-prefix/src/json-rpc-cpp - CONFIGURE_COMMAND cmake -DCMAKE_INSTALL_PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_MODULE_PATH:PATH=${CMAKE_CURRENT_SOURCE_DIR} -DETH_DEPENDENCY_INSTALL_DIR:PATH=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev . + CONFIGURE_COMMAND cmake -DCMAKE_INSTALL_PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_MODULE_PATH:PATH=${CMAKE_CURRENT_SOURCE_DIR}/cmake -DETH_DEPENDENCY_INSTALL_DIR:PATH=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev . BUILD_COMMAND make -j 3 INSTALL_COMMAND make install ) @@ -31,7 +31,7 @@ ExternalProject_Add(json-rpc-cpp GIT_REPOSITORY https://github.com/cinemast/libjson-rpc-cpp.git GIT_TAG v0.3.2 BINARY_DIR json-rpc-cpp-prefix/src/json-rpc-cpp - CONFIGURE_COMMAND cmake -DCMAKE_INSTALL_PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_MODULE_PATH:PATH=${CMAKE_CURRENT_SOURCE_DIR} -DETH_DEPENDENCY_INSTALL_DIR:PATH=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST . + CONFIGURE_COMMAND cmake -DCMAKE_INSTALL_PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_MODULE_PATH:PATH=${CMAKE_CURRENT_SOURCE_DIR}/cmake -DETH_DEPENDENCY_INSTALL_DIR:PATH=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST . BUILD_COMMAND make -j 3 INSTALL_COMMAND make install ) diff --git a/extdep/jsoncpp.cmake b/extdep/compile/jsoncpp.cmake similarity index 100% rename from extdep/jsoncpp.cmake rename to extdep/compile/jsoncpp.cmake diff --git a/extdep/leveldb.cmake b/extdep/compile/leveldb.cmake similarity index 91% rename from extdep/leveldb.cmake rename to extdep/compile/leveldb.cmake index 5399b34b8..a22773d59 100644 --- a/extdep/leveldb.cmake +++ b/extdep/compile/leveldb.cmake @@ -3,7 +3,7 @@ ExternalProject_Add(leveldb DEPENDS snappy URL https://leveldb.googlecode.com/files/leveldb-1.15.0.tar.gz BINARY_DIR leveldb-prefix/src/leveldb - CONFIGURE_COMMAND patch < ${CMAKE_CURRENT_SOURCE_DIR}/leveldb_osx.patch + CONFIGURE_COMMAND patch < ${CMAKE_CURRENT_SOURCE_DIR}/compile/leveldb_osx.patch BUILD_COMMAND export ETH_DEPENDENCY_INSTALL_DIR=${ETH_DEPENDENCY_INSTALL_DIR} && make -j 3 INSTALL_COMMAND cp -rf include/leveldb ${ETH_DEPENDENCY_INSTALL_DIR}/include/ && cp libleveldb.a ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp libleveldb.dylib.1.15 ${ETH_DEPENDENCY_INSTALL_DIR}/lib/libleveldb.dylib ) diff --git a/extdep/leveldb_osx.patch b/extdep/compile/leveldb_osx.patch similarity index 100% rename from extdep/leveldb_osx.patch rename to extdep/compile/leveldb_osx.patch diff --git a/extdep/qt.cmake b/extdep/compile/qt.cmake similarity index 84% rename from extdep/qt.cmake rename to extdep/compile/qt.cmake index 42f4331ab..2ff0e1e5b 100644 --- a/extdep/qt.cmake +++ b/extdep/compile/qt.cmake @@ -2,7 +2,7 @@ if(APPLE) ExternalProject_add(qt URL http://qtmirror.ics.com/pub/qtproject/official_releases/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.gz BINARY_DIR qt-prefix/src/qt - PATCH_COMMAND patch -d qtmultimedia/src/plugins/avfoundation/mediaplayer < ${CMAKE_CURRENT_SOURCE_DIR}/qt_osx.patch + PATCH_COMMAND patch -d qtmultimedia/src/plugins/avfoundation/mediaplayer < ${CMAKE_CURRENT_SOURCE_DIR}/compile/qt_osx.patch CONFIGURE_COMMAND ./configure -prefix ${ETH_DEPENDENCY_INSTALL_DIR} -system-zlib -qt-libpng -qt-libjpeg -confirm-license -opensource -nomake tests -release -nomake examples -no-xcb -arch x86_64 BUILD_COMMAND make INSTALL_COMMAND make install @@ -12,8 +12,8 @@ ExternalProject_Add(qt DEPENDS icu jom URL http://download.qt-project.org/official_releases/qt/5.2/5.2.1/single/qt-everywhere-opensource-src-5.2.1.tar.gz BINARY_DIR qt-prefix/src/qt - UPDATE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tools.bat - PATCH_COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/configure.bat qtbase + UPDATE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/compile/qt_tools.bat + PATCH_COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/compile/qt_configure.bat qtbase/configure.bat CONFIGURE_COMMAND configure -prefix ${ETH_DEPENDENCY_INSTALL_DIR} -opensource -confirm-license -release -opengl desktop -platform win32-msvc2013 -icu -I ${ETH_DEPENDENCY_INSTALL_DIR}/include -L ${ETH_DEPENDENCY_INSTALL_DIR}/lib -nomake tests -nomake examples BUILD_COMMAND nmake diff --git a/extdep/configure.bat b/extdep/compile/qt_configure.bat similarity index 100% rename from extdep/configure.bat rename to extdep/compile/qt_configure.bat diff --git a/extdep/qt_osx.patch b/extdep/compile/qt_osx.patch similarity index 100% rename from extdep/qt_osx.patch rename to extdep/compile/qt_osx.patch diff --git a/extdep/tools.bat b/extdep/compile/qt_tools.bat similarity index 100% rename from extdep/tools.bat rename to extdep/compile/qt_tools.bat diff --git a/extdep/snappy.cmake b/extdep/compile/snappy.cmake similarity index 100% rename from extdep/snappy.cmake rename to extdep/compile/snappy.cmake diff --git a/extdep/precompiled/json-rpc-cpp.cmake b/extdep/precompiled/json-rpc-cpp.cmake new file mode 100644 index 000000000..ef60eb54f --- /dev/null +++ b/extdep/precompiled/json-rpc-cpp.cmake @@ -0,0 +1,8 @@ +ExternalProject_Add(json-rpc-cpp + URL ${ETH_DEPENDENCY_SERVER}/json-rpc-cpp.tar.gz + BINARY_DIR json-rpc-cpp-prefix/src/json-rpc-cpp + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND cmake -E copy_directory . ${ETH_DEPENDENCY_INSTALL_DIR} + ) +