aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGav Wood <g@ethdev.com>2015-08-20 17:01:33 +0800
committerGav Wood <g@ethdev.com>2015-08-20 17:01:33 +0800
commit38235cc9e14d442516a73b5a46260ad82255e3ff (patch)
tree39fd4a279c6aa7fefa314e10b615bc37137905d4 /CMakeLists.txt
parent4c8b2202575b8c169b6dda9f81a0c6f171361df9 (diff)
parent8d9eb6830781cc107d09a92a59f71914a341ad3c (diff)
downloaddexon-solidity-38235cc9e14d442516a73b5a46260ad82255e3ff.tar.gz
dexon-solidity-38235cc9e14d442516a73b5a46260ad82255e3ff.tar.zst
dexon-solidity-38235cc9e14d442516a73b5a46260ad82255e3ff.zip
Merge pull request #6 from chriseth/cmakeUpdateTests
Modularise CMakeLists files and integrate tests.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt32
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