Browse Source

use CMAKE_PREFIX_PATH instead of CMAKE_FILE_ROOT_PATH; removed the

requirement to use EXACT version numbers for dependencies, cleanup
cl-refactor
sveneh 10 years ago
parent
commit
79f2e52ec6
  1. 8
      cmake/EthDependencies.cmake
  2. 2
      extdep/CMakeLists.txt
  3. 8
      extdep/json-rpc-cpp.cmake
  4. 1
      test/CMakeLists.txt

8
cmake/EthDependencies.cmake

@ -4,22 +4,22 @@
# by defining this variable, cmake will look for dependencies first in our own repository before looking in system paths like /usr/local/ ... # by defining this variable, cmake will look for dependencies first in our own repository before looking in system paths like /usr/local/ ...
# this must be set to point to the same directory as $ETH_DEPENDENCY_INSTALL_DIR in /extdep directory # this must be set to point to the same directory as $ETH_DEPENDENCY_INSTALL_DIR in /extdep directory
string(TOLOWER ${CMAKE_SYSTEM_NAME} _system_name) string(TOLOWER ${CMAKE_SYSTEM_NAME} _system_name)
set (CMAKE_FIND_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/extdep/install/${_system_name}") set (CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/extdep/install/${_system_name}")
# Dependencies must have a version number + EXACT, to ensure reproducible builds # Dependencies must have a version number, to ensure reproducible build. The version provided here is the one that is in the extdep repository. If you use system libraries, version numbers may be different.
find_package (CryptoPP 5.6.2 EXACT REQUIRED) find_package (CryptoPP 5.6.2 EXACT REQUIRED)
message(" - CryptoPP header: ${CRYPTOPP_INCLUDE_DIRS}") message(" - CryptoPP header: ${CRYPTOPP_INCLUDE_DIRS}")
message(" - CryptoPP lib : ${CRYPTOPP_LIBRARIES}") message(" - CryptoPP lib : ${CRYPTOPP_LIBRARIES}")
# TODO the Jsoncpp package does not yet check for correct version number # TODO the Jsoncpp package does not yet check for correct version number
find_package (Jsoncpp 0.60 EXACT REQUIRED) find_package (Jsoncpp 0.60 REQUIRED)
message(" - Jsoncpp header: ${JSONCPP_INCLUDE_DIRS}") message(" - Jsoncpp header: ${JSONCPP_INCLUDE_DIRS}")
message(" - Jsoncpp lib : ${JSONCPP_LIBRARIES}") message(" - Jsoncpp lib : ${JSONCPP_LIBRARIES}")
# TODO the JsonRpcCpp package does not yet check for correct version number # TODO the JsonRpcCpp package does not yet check for correct version number
find_package (JsonRpcCpp 0.3.2 EXACT REQUIRED) find_package (JsonRpcCpp 0.3.2 REQUIRED)
if (${JSON_RPC_CPP_FOUND}) if (${JSON_RPC_CPP_FOUND})
message (" - json-rpc-cpp header: ${JSON_RPC_CPP_INCLUDE_DIRS}") message (" - json-rpc-cpp header: ${JSON_RPC_CPP_INCLUDE_DIRS}")
message (" - json-rpc-cpp lib : ${JSON_RPC_CPP_LIBRARIES}") message (" - json-rpc-cpp lib : ${JSON_RPC_CPP_LIBRARIES}")

2
extdep/CMakeLists.txt

@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 2.8)
include(ExternalProject) 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}")
@ -13,4 +12,3 @@ include(cryptopp.cmake)
# include(curl.cmake) # include(curl.cmake)
include(json-rpc-cpp.cmake) include(json-rpc-cpp.cmake)
#include(miniupnpc.cmake) #include(miniupnpc.cmake)

8
extdep/json-rpc-cpp.cmake

@ -1,11 +1,7 @@
# json-rpc-cpp is under heavy development, not yet stable, and multiplatform builds are not yet available. # json-rpc-cpp is under heavy development, not yet stable, and multiplatform builds are not yet available.
# DO NOT MESS WITH THESE SETTINGS! IF YOU HAVE TO MAKE CHANGES HERE, CONSULT sven@ethdev.com BEFOREHAND!! # DO NOT MESS WITH THESE SETTINGS! IF YOU HAVE TO MAKE CHANGES HERE, CONSULT sven@ethdev.com BEFOREHAND!!
if(APPLE) set(_config_cmd 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 .)
set(CONFIG_CMD 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 .)
else()
set(CONFIG_CMD 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 .)
endif()
# DO NOT CHANGE ANYTHING HERE! # DO NOT CHANGE ANYTHING HERE!
@ -14,7 +10,7 @@ ExternalProject_Add(json-rpc-cpp
GIT_REPOSITORY https://github.com/cinemast/libjson-rpc-cpp.git GIT_REPOSITORY https://github.com/cinemast/libjson-rpc-cpp.git
GIT_TAG v0.3.2 GIT_TAG v0.3.2
BINARY_DIR json-rpc-cpp-prefix/src/json-rpc-cpp BINARY_DIR json-rpc-cpp-prefix/src/json-rpc-cpp
CONFIGURE_COMMAND ${CONFIG_CMD} CONFIGURE_COMMAND ${_config_cmd}
BUILD_COMMAND make -j 3 BUILD_COMMAND make -j 3
INSTALL_COMMAND make install INSTALL_COMMAND make install
) )

1
test/CMakeLists.txt

@ -19,7 +19,6 @@ target_link_libraries(testeth gmp)
target_link_libraries(testeth solidity) target_link_libraries(testeth solidity)
target_link_libraries(testeth webthree) target_link_libraries(testeth webthree)
#TODO this on should not be necessary, it should have been brought in from ethcore dependency...
target_link_libraries(testeth ${CRYPTOPP_LIBRARIES}) target_link_libraries(testeth ${CRYPTOPP_LIBRARIES})
if(JSON_RPC_CPP_FOUND) if(JSON_RPC_CPP_FOUND)

Loading…
Cancel
Save