diff options
author | chriseth <c@ethdev.com> | 2015-08-20 06:55:41 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-08-20 06:55:41 +0800 |
commit | 8d9eb6830781cc107d09a92a59f71914a341ad3c (patch) | |
tree | 39fd4a279c6aa7fefa314e10b615bc37137905d4 /CMakeLists.txt | |
parent | 4c8b2202575b8c169b6dda9f81a0c6f171361df9 (diff) | |
download | dexon-solidity-8d9eb6830781cc107d09a92a59f71914a341ad3c.tar dexon-solidity-8d9eb6830781cc107d09a92a59f71914a341ad3c.tar.gz dexon-solidity-8d9eb6830781cc107d09a92a59f71914a341ad3c.tar.bz2 dexon-solidity-8d9eb6830781cc107d09a92a59f71914a341ad3c.tar.lz dexon-solidity-8d9eb6830781cc107d09a92a59f71914a341ad3c.tar.xz dexon-solidity-8d9eb6830781cc107d09a92a59f71914a341ad3c.tar.zst dexon-solidity-8d9eb6830781cc107d09a92a59f71914a341ad3c.zip |
Modularise CMakeLists files and integrate tests.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e3c48341..5198adb4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,31 +20,39 @@ else() endif() # Figure out environment. -set(CPPETHEREUM_BUILD "${CMAKE_CURRENT_SOURCE_DIR}/../cpp-ethereum/${BUILD_DIR_NAME}" CACHE STRING "The absolute build directory of cpp-ethereum.") set(ETH_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/../cpp-ethereum-cmake" CACHE PATH "The the path to the cmake directory") set(ETH_DIR "${CMAKE_CURRENT_LIST_DIR}/../cpp-ethereum" CACHE PATH "The path to the cpp-ethereum directory") set(BUILD_DIR_NAME "build" CACHE STRING "The name of the build directory in cpp-ethereum") set(ETH_BUILD_DIR "${ETH_DIR}/${BUILD_DIR_NAME}") +# A place where should we look for *.cmake files list(APPEND CMAKE_MODULE_PATH ${ETH_CMAKE_DIR}) +# A place where we should look for ethereum libraries +set(CMAKE_LIBRARY_PATH ${ETH_BUILD_DIR}) + +# Let's find our dependencies include(EthDependencies) -include(EthExecutableHelper) + +# Figure out what compiler and system are we using include(EthCompilerSettings) -include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS}) -include_directories(BEFORE ..) -include_directories(${Boost_INCLUDE_DIRS}) -include_directories(libsolidity) +# Include helper macros +include(EthExecutableHelper) + # Include a directory with BuildInfo.h include_directories(${ETH_BUILD_DIR}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../cpp-ethereum) -include_directories(${CPPETHEREUM_BUILD}) -file(GLOB_RECURSE SRC_LIST "libsolidity/*.cpp") -file(GLOB_RECURSE HEADERS "libsolidity/*.h") +find_package(Eth) + +include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS}) +include_directories(BEFORE .) +include_directories(${Boost_INCLUDE_DIRS}) +include_directories(${ETH_DIR}) +include_directories(${CPPETHEREUM_BUILD}) -set(EXECUTABLE solidity) -add_library(${EXECUTABLE} ${SRC_LIST} ${HEADERS}) +add_subdirectory(libsolidity) +add_subdirectory(solc) +add_subdirectory(test) # TODO installation and packaging rules |