solidity/CMakeLists.txt

49 lines
1.7 KiB
CMake
Raw Normal View History

2014-01-03 01:27:19 +00:00
cmake_policy(SET CMP0015 NEW)
aux_source_directory(. SRC_LIST)
2014-10-14 10:41:01 +00:00
list(REMOVE_ITEM SRC_LIST "./createRandomTest.cpp")
2014-01-07 21:51:19 +00:00
2014-04-23 14:08:11 +00:00
include_directories(..)
2014-01-03 01:27:19 +00:00
2014-10-16 13:10:54 +00:00
file(GLOB HEADERS "*.h")
add_executable(testeth ${SRC_LIST} ${HEADERS})
2014-10-14 10:41:01 +00:00
add_executable(createRandomTest createRandomTest.cpp vm.cpp)
2014-07-03 13:00:22 +00:00
target_link_libraries(testeth ethereum)
target_link_libraries(testeth ethcore)
target_link_libraries(testeth secp256k1)
target_link_libraries(testeth gmp)
target_link_libraries(testeth solidity)
2014-07-03 13:00:22 +00:00
target_link_libraries(testeth ${CRYPTOPP_LS})
2014-10-13 09:22:28 +00:00
target_link_libraries(testeth webthree)
if(JSONRPC_LS)
target_link_libraries(testeth web3jsonrpc)
2014-11-03 15:54:03 +00:00
target_link_libraries(testeth ${JSONRPC_CLIENT_LS})
endif()
2014-01-03 01:27:19 +00:00
2014-10-14 10:41:01 +00:00
target_link_libraries(createRandomTest ethereum)
target_link_libraries(createRandomTest ethcore)
target_link_libraries(createRandomTest boost_chrono)
target_link_libraries(createRandomTest boost_unit_test_framework)
2014-07-06 11:13:37 +00:00
if ("${TARGET_PLATFORM}" STREQUAL "w64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
2014-07-03 13:00:22 +00:00
target_link_libraries(testeth boost_system-mt-s)
target_link_libraries(testeth boost_filesystem-mt-s)
target_link_libraries(testeth boost_thread_win32-mt-s)
target_link_libraries(testeth gcc)
target_link_libraries(testeth gdi32)
target_link_libraries(testeth ws2_32)
target_link_libraries(testeth mswsock)
target_link_libraries(testeth shlwapi)
target_link_libraries(testeth iphlpapi)
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
2014-03-07 00:19:00 +00:00
elseif (UNIX)
2014-07-03 13:00:22 +00:00
find_package(Boost 1.53 REQUIRED COMPONENTS unit_test_framework)
else ()
target_link_libraries(testeth boost_system)
target_link_libraries(testeth boost_filesystem)
find_package(Threads REQUIRED)
target_link_libraries(testeth ${CMAKE_THREAD_LIBS_INIT})
endif ()