From faf541f8aee09cd2d51ea9f7d0da8ba1662498bf Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Fri, 12 Dec 2014 12:01:32 +0100 Subject: [PATCH] renamed _DIR -> _DIRS && _LIBRARY -> _LIBRARIES according to cmake guidelines --- cmake/EthDependencies.cmake | 20 ++++++++++---------- cmake/FindGmp.cmake | 7 +++++-- cmake/FindLevelDB.cmake | 13 ++++++------- cmake/FindMiniupnpc.cmake | 7 +++++-- cmake/FindReadline.cmake | 7 +++++-- eth/CMakeLists.txt | 4 ++-- exp/CMakeLists.txt | 6 +++--- libdevcrypto/CMakeLists.txt | 8 ++++---- libethcore/CMakeLists.txt | 6 +++--- libethereum/CMakeLists.txt | 6 +++--- libevm/CMakeLists.txt | 6 +++--- libp2p/CMakeLists.txt | 6 +++--- libweb3jsonrpc/CMakeLists.txt | 6 +++--- libwebthree/CMakeLists.txt | 6 +++--- libwhisper/CMakeLists.txt | 6 +++--- neth/CMakeLists.txt | 6 +++--- secp256k1/CMakeLists.txt | 2 +- test/CMakeLists.txt | 2 +- 18 files changed, 66 insertions(+), 58 deletions(-) diff --git a/cmake/EthDependencies.cmake b/cmake/EthDependencies.cmake index 31f9420ad..24e5bd07d 100644 --- a/cmake/EthDependencies.cmake +++ b/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) diff --git a/cmake/FindGmp.cmake b/cmake/FindGmp.cmake index dc2bce813..4dc8f48c4 100644 --- a/cmake/FindGmp.cmake +++ b/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) diff --git a/cmake/FindLevelDB.cmake b/cmake/FindLevelDB.cmake index 3806be9ad..6bd373a9f 100644 --- a/cmake/FindLevelDB.cmake +++ b/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 diff --git a/cmake/FindMiniupnpc.cmake b/cmake/FindMiniupnpc.cmake index 55795d0f9..4ecbb0c4a 100644 --- a/cmake/FindMiniupnpc.cmake +++ b/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) diff --git a/cmake/FindReadline.cmake b/cmake/FindReadline.cmake index 3db845bd0..1f47db4a7 100644 --- a/cmake/FindReadline.cmake +++ b/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) diff --git a/eth/CMakeLists.txt b/eth/CMakeLists.txt index a7feb4927..9996d1170 100644 --- a/eth/CMakeLists.txt +++ b/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) diff --git a/exp/CMakeLists.txt b/exp/CMakeLists.txt index 47db2afe7..98eae7baf 100644 --- a/exp/CMakeLists.txt +++ b/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) diff --git a/libdevcrypto/CMakeLists.txt b/libdevcrypto/CMakeLists.txt index f5661bab1..354053483 100644 --- a/libdevcrypto/CMakeLists.txt +++ b/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) diff --git a/libethcore/CMakeLists.txt b/libethcore/CMakeLists.txt index ede6eb087..960936b3a 100644 --- a/libethcore/CMakeLists.txt +++ b/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) diff --git a/libethereum/CMakeLists.txt b/libethereum/CMakeLists.txt index e1bad4426..c13f2ba18 100644 --- a/libethereum/CMakeLists.txt +++ b/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) diff --git a/libevm/CMakeLists.txt b/libevm/CMakeLists.txt index 57004ebbb..94f7e5e79 100644 --- a/libevm/CMakeLists.txt +++ b/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) diff --git a/libp2p/CMakeLists.txt b/libp2p/CMakeLists.txt index f542afd0f..c94ebebbd 100644 --- a/libp2p/CMakeLists.txt +++ b/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) diff --git a/libweb3jsonrpc/CMakeLists.txt b/libweb3jsonrpc/CMakeLists.txt index 74fea58b7..9a0771ef7 100644 --- a/libweb3jsonrpc/CMakeLists.txt +++ b/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) diff --git a/libwebthree/CMakeLists.txt b/libwebthree/CMakeLists.txt index 837ecb313..587d81493 100644 --- a/libwebthree/CMakeLists.txt +++ b/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) diff --git a/libwhisper/CMakeLists.txt b/libwhisper/CMakeLists.txt index 8beb1b988..f51af33b7 100644 --- a/libwhisper/CMakeLists.txt +++ b/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) diff --git a/neth/CMakeLists.txt b/neth/CMakeLists.txt index 14d710ef2..63619fd84 100644 --- a/neth/CMakeLists.txt +++ b/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) diff --git a/secp256k1/CMakeLists.txt b/secp256k1/CMakeLists.txt index 747d5e1cb..8dbe175d5 100644 --- a/secp256k1/CMakeLists.txt +++ b/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}) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 440334964..73003e805 100644 --- a/test/CMakeLists.txt +++ b/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)