Browse Source

renamed _DIR -> _DIRS && _LIBRARY -> _LIBRARIES according to cmake guidelines

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
faf541f8ae
  1. 20
      cmake/EthDependencies.cmake
  2. 7
      cmake/FindGmp.cmake
  3. 13
      cmake/FindLevelDB.cmake
  4. 7
      cmake/FindMiniupnpc.cmake
  5. 7
      cmake/FindReadline.cmake
  6. 4
      eth/CMakeLists.txt
  7. 6
      exp/CMakeLists.txt
  8. 8
      libdevcrypto/CMakeLists.txt
  9. 6
      libethcore/CMakeLists.txt
  10. 6
      libethereum/CMakeLists.txt
  11. 6
      libevm/CMakeLists.txt
  12. 6
      libp2p/CMakeLists.txt
  13. 6
      libweb3jsonrpc/CMakeLists.txt
  14. 6
      libwebthree/CMakeLists.txt
  15. 6
      libwhisper/CMakeLists.txt
  16. 6
      neth/CMakeLists.txt
  17. 2
      secp256k1/CMakeLists.txt
  18. 2
      test/CMakeLists.txt

20
cmake/EthDependencies.cmake

@ -24,8 +24,8 @@ message(" - CryptoPP header: ${CRYPTOPP_INCLUDE_DIRS}")
message(" - CryptoPP lib : ${CRYPTOPP_LIBRARIES}")
find_package (LevelDB REQUIRED)
message(" - LevelDB header: ${LEVELDB_INCLUDE_DIR}")
message(" - LevelDB lib: ${LEVELDB_LIBRARY}")
message(" - LevelDB header: ${LEVELDB_INCLUDE_DIRS}")
message(" - LevelDB lib: ${LEVELDB_LIBRARIES}")
# TODO the Jsoncpp package does not yet check for correct version number
find_package (Jsoncpp 0.60 REQUIRED)
@ -53,8 +53,8 @@ endif() #JSONRPC
# TODO get rid of -DETH_READLINE
find_package (Readline 6.3.8)
if (READLINE_FOUND)
message (" - readline header: ${READLINE_INCLUDE_DIR}")
message (" - readline lib : ${READLINE_LIBRARY}")
message (" - readline header: ${READLINE_INCLUDE_DIRS}")
message (" - readline lib : ${READLINE_LIBRARIES}")
add_definitions(-DETH_READLINE)
endif ()
@ -63,8 +63,8 @@ endif ()
# TODO get rid of -DMINIUPNPC
find_package (Miniupnpc 1.8.2013)
if (MINIUPNPC_FOUND)
message (" - miniupnpc header: ${MINIUPNPC_INCLUDE_DIR}")
message (" - miniupnpc lib : ${MINIUPNPC_LIBRARY}")
message (" - miniupnpc header: ${MINIUPNPC_INCLUDE_DIRS}")
message (" - miniupnpc lib : ${MINIUPNPC_LIBRARIES}")
add_definitions(-DETH_MINIUPNPC)
endif()
@ -72,15 +72,15 @@ endif()
# TODO it is also not required in msvc build
find_package (Gmp 6.0.0)
if (GMP_FOUND)
message(" - gmp Header: ${GMP_INCLUDE_DIR}")
message(" - gmp lib : ${GMP_LIBRARY}")
message(" - gmp Header: ${GMP_INCLUDE_DIRS}")
message(" - gmp lib : ${GMP_LIBRARIES}")
endif()
# curl is only requried for tests
# TODO specify min curl version, on windows we are currenly using 7.29
find_package (CURL)
message(" - curl header: ${CURL_INCLUDE_DIR}")
message(" - curl lib : ${CURL_LIBRARY}")
message(" - curl header: ${CURL_INCLUDE_DIRS}")
message(" - curl lib : ${CURL_LIBRARIES}")
# do not compile GUI
if (NOT HEADLESS)

7
cmake/FindGmp.cmake

@ -5,8 +5,8 @@
# if you nee to add a custom library search path, do it via via CMAKE_FIND_ROOT_PATH
#
# This module defines
# GMP_INCLUDE_DIR, where to find header, etc.
# GMP_LIBRARY, the libraries needed to use gmp.
# GMP_INCLUDE_DIRS, where to find header, etc.
# GMP_LIBRARIES, the libraries needed to use gmp.
# GMP_FOUND, If false, do not try to use gmp.
# only look in default directories
@ -22,6 +22,9 @@ find_library(
DOC "gmp library"
)
set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR})
set(GMP_LIBRARIES ${GMP_LIBRARY})
# handle the QUIETLY and REQUIRED arguments and set GMP_FOUND to TRUE
# if all listed variables are TRUE, hide their existence from configuration view
include(FindPackageHandleStandardArgs)

13
cmake/FindLevelDB.cmake

@ -5,8 +5,8 @@
# if you nee to add a custom library search path, do it via via CMAKE_FIND_ROOT_PATH
#
# This module defines
# LEVELDB_INCLUDE_DIR, where to find header, etc.
# LEVELDB_LIBRARY, the libraries needed to use leveldb.
# LEVELDB_INCLUDE_DIRS, where to find header, etc.
# LEVELDB_LIBRARIES, the libraries needed to use leveldb.
# LEVELDB_FOUND, If false, do not try to use leveldb.
# only look in default directories
@ -14,17 +14,16 @@ find_path(
LEVELDB_INCLUDE_DIR
NAMES leveldb/db.h
DOC "leveldb include dir"
)
)
find_library(
LEVELDB_LIBRARY
NAMES leveldb
DOC "leveldb library"
)
# message (" - leveldb header : ${LEVELDB_INCLUDE_DIR}")
# message (" - leveldb lib : ${LEVELDB_LIBRARY}")
)
set(LEVELDB_INCLUDE_DIRS ${LEVELDB_INCLUDE_DIR})
set(LEVELDB_LIBRARIES ${LEVELDB_LIBRARY})
# handle the QUIETLY and REQUIRED arguments and set LEVELDB_FOUND to TRUE
# if all listed variables are TRUE, hide their existence from configuration view

7
cmake/FindMiniupnpc.cmake

@ -5,8 +5,8 @@
# if you nee to add a custom library search path, do it via via CMAKE_FIND_ROOT_PATH
#
# This module defines
# MINIUPNPC_INCLUDE_DIR, where to find header, etc.
# MINIUPNPC_LIBRARY, the libraries needed to use gmp.
# MINIUPNPC_INCLUDE_DIRS, where to find header, etc.
# MINIUPNPC_LIBRARIES, the libraries needed to use gmp.
# MINIUPNPC_FOUND, If false, do not try to use gmp.
# only look in default directories
@ -22,6 +22,9 @@ find_library(
DOC "miniupnpc library"
)
set(MINIUPNPC_INCLUDE_DIRS ${MINIUPNPC_INCLUDE_DIR})
set(MINIUPNPC_LIBRARIES ${MINIUPNPC_LIBRARY})
# handle the QUIETLY and REQUIRED arguments and set MINIUPNPC_FOUND to TRUE
# if all listed variables are TRUE, hide their existence from configuration view
include(FindPackageHandleStandardArgs)

7
cmake/FindReadline.cmake

@ -5,8 +5,8 @@
# if you nee to add a custom library search path, do it via via CMAKE_FIND_ROOT_PATH
#
# This module defines
# READLINE_INCLUDE_DIR, where to find header, etc.
# READLINE_LIBRARY, the libraries needed to use readline.
# READLINE_INCLUDE_DIRS, where to find header, etc.
# READLINE_LIBRARIES, the libraries needed to use readline.
# READLINE_FOUND, If false, do not try to use readline.
# only look in default directories
@ -22,6 +22,9 @@ find_library(
DOC "readline library"
)
set(READLINE_INCLUDE_DIRS ${READLINE_INCLUDE_DIR})
set(READLINE_LIBRARIES ${READLINE_LIBRARY})
# handle the QUIETLY and REQUIRED arguments and set READLINE_FOUND to TRUE
# if all listed variables are TRUE, hide their existence from configuration view
include(FindPackageHandleStandardArgs)

4
eth/CMakeLists.txt

@ -18,11 +18,11 @@ target_link_libraries(${EXECUTABLE} ${Boost_REGEX_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_DATE_TIME_LIBRARY_RELEASE})
if (MINIUPNPC_FOUND)
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY})
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARIES})
endif()
if (READLINE_FOUND)
target_link_libraries(${EXECUTABLE} ${READLINE_LIBRARY})
target_link_libraries(${EXECUTABLE} ${READLINE_LIBRARIES})
endif()
if (JSONRPC)

6
exp/CMakeLists.txt

@ -3,17 +3,17 @@ set(CMAKE_AUTOMOC OFF)
aux_source_directory(. SRC_LIST)
include_directories(${LEVELDB_INCLUDE_DIR})
include_directories(${LEVELDB_INCLUDE_DIRS})
include_directories(..)
set(EXECUTABLE exp)
add_executable(${EXECUTABLE} ${SRC_LIST})
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY})
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARIES})
if (MINIUPNPC_FOUND)
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY})
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARIES})
endif()
target_link_libraries(${EXECUTABLE} ethereum)

8
libdevcrypto/CMakeLists.txt

@ -9,8 +9,8 @@ set(CMAKE_AUTOMOC OFF)
aux_source_directory(. SRC_LIST)
include_directories(${CRYPTOPP_INCLUDE_DIR})
include_directories(${LEVELDB_INCLUDE_DIR})
include_directories(${CRYPTOPP_INCLUDE_DIRS})
include_directories(${LEVELDB_INCLUDE_DIRS})
include_directories(..)
set(EXECUTABLE devcrypto)
@ -23,8 +23,8 @@ else()
endif()
target_link_libraries(${EXECUTABLE} ${Boost_FILESYSTEM_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY})
target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LIBRARY})
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LIBRARIES})
target_link_libraries(${EXECUTABLE} devcore)
target_link_libraries(${EXECUTABLE} secp256k1)

6
libethcore/CMakeLists.txt

@ -9,8 +9,8 @@ set(CMAKE_AUTOMOC OFF)
aux_source_directory(. SRC_LIST)
include_directories(${CRYPTOPP_INCLUDE_DIR})
include_directories(${LEVELDB_INCLUDE_DIR})
include_directories(${CRYPTOPP_INCLUDE_DIRS})
include_directories(${LEVELDB_INCLUDE_DIRS})
include_directories(..)
set(EXECUTABLE ethcore)
@ -23,7 +23,7 @@ else()
add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS})
endif()
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY})
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARIES})
target_link_libraries(${EXECUTABLE} devcrypto)
target_link_libraries(${EXECUTABLE} devcore)
target_link_libraries(${EXECUTABLE} secp256k1)

6
libethereum/CMakeLists.txt

@ -11,7 +11,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")
aux_source_directory(. SRC_LIST)
include_directories(${LEVELDB_INCLUDE_DIR})
include_directories(${LEVELDB_INCLUDE_DIRS})
include_directories(..)
set(EXECUTABLE ethereum)
@ -24,11 +24,11 @@ else()
add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS})
endif()
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY})
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${Boost_REGEX_LIBRARY_RELEASE})
if (MINIUPNPC_FOUND)
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY})
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARIES})
endif()
target_link_libraries(${EXECUTABLE} evm)

6
libevm/CMakeLists.txt

@ -12,7 +12,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")
aux_source_directory(. SRC_LIST)
include_directories(..)
include_directories(${LEVELDB_INCLUDE_DIR})
include_directories(${LEVELDB_INCLUDE_DIRS})
set(EXECUTABLE evm)
@ -24,10 +24,10 @@ else()
add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS})
endif()
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY})
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARIES})
if (MINIUPNPC_FOUND)
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY})
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARIES})
endif()
target_link_libraries(${EXECUTABLE} ethcore)

6
libp2p/CMakeLists.txt

@ -11,8 +11,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")
aux_source_directory(. SRC_LIST)
include_directories(${LEVELDB_INCLUDE_DIRS})
include_directories(..)
include_directories(${LEVELDB_INCLUDE_DIR})
set(EXECUTABLE p2p)
@ -24,10 +24,10 @@ else()
add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS})
endif()
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY})
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARIES})
if(MINIUPNPC_FOUND)
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY})
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARIES})
endif()
target_link_libraries(${EXECUTABLE} devcrypto)

6
libweb3jsonrpc/CMakeLists.txt

@ -10,7 +10,7 @@ set(CMAKE_AUTOMOC OFF)
aux_source_directory(. SRC_LIST)
include_directories(${JSON_RPC_CPP_INCLUDE_DIRS})
include_directories(${LEVELDB_INCLUDE_DIR})
include_directories(${LEVELDB_INCLUDE_DIRS})
include_directories(..)
set(EXECUTABLE web3jsonrpc)
@ -23,13 +23,13 @@ else()
add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS})
endif()
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY})
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${JSONCPP_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${JSON_RPC_CPP_COMMON_LIBRARY})
target_link_libraries(${EXECUTABLE} ${JSON_RPC_CPP_SERVER_LIBRARY})
if (MINIUPNPC_FOUND)
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY})
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARIES})
endif()
target_link_libraries(${EXECUTABLE} webthree)

6
libwebthree/CMakeLists.txt

@ -11,7 +11,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")
aux_source_directory(. SRC_LIST)
include_directories(${LEVELDB_INCLUDE_DIR})
include_directories(${LEVELDB_INCLUDE_DIRS})
include_directories(..)
set(EXECUTABLE webthree)
@ -24,10 +24,10 @@ else()
add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS})
endif()
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY})
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARIES})
if (MINIUPNPC_FOUND)
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY})
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARIES})
endif()
target_link_libraries(${EXECUTABLE} ethereum)

6
libwhisper/CMakeLists.txt

@ -12,7 +12,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")
aux_source_directory(. SRC_LIST)
include_directories(..)
include_directories(${LEVELDB_INCLUDE_DIR})
include_directories(${LEVELDB_INCLUDE_DIRS})
set(EXECUTABLE whisper)
@ -24,10 +24,10 @@ else()
add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS})
endif()
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY})
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARIES})
if (MINIUPNPC_FOUND)
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY})
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARIES})
endif()
target_link_libraries(${EXECUTABLE} ethcore)

6
neth/CMakeLists.txt

@ -3,7 +3,7 @@ cmake_policy(SET CMP0015 NEW)
aux_source_directory(. SRC_LIST)
include_directories(${JSON_RPC_CPP_INCLUDE_DIRS})
include_directories(${LEVELDB_INCLUDE_DIR})
include_directories(${LEVELDB_INCLUDE_DIRS})
include_directories(..)
set(EXECUTABLE neth)
@ -12,10 +12,10 @@ add_executable(${EXECUTABLE} ${SRC_LIST})
add_dependencies(${EXECUTABLE} BuildInfo.h)
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY})
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARIES})
if (MINIUPNPC_FOUND)
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY})
target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARIES})
endif()
if (JSONRPC)

2
secp256k1/CMakeLists.txt

@ -20,7 +20,7 @@ if (APPLE OR UNIX)
add_library(${EXECUTABLE} SHARED ${EXECUTABLE}.c field_5x52_asm.asm)
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -DUSE_FIELD_GMP -DUSE_NUM_GMP -DUSE_FIELD_INV_NUM")
target_link_libraries(${EXECUTABLE} ${GMP_LIBRARY})
target_link_libraries(${EXECUTABLE} ${GMP_LIBRARIES})
else()
include_directories(${Boost_INCLUDE_DIRS})

2
test/CMakeLists.txt

@ -18,7 +18,7 @@ target_link_libraries(testeth secp256k1)
target_link_libraries(testeth solidity)
target_link_libraries(testeth webthree)
target_link_libraries(testeth ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE})
target_link_libraries(testeth ${CURL_LIBRARY})
target_link_libraries(testeth ${CURL_LIBRARIES})
if (JSONRPC)
target_link_libraries(testeth web3jsonrpc)

Loading…
Cancel
Save