Browse Source

serpent compiling under msvc

cl-refactor
debris 10 years ago
parent
commit
cd0a538138
  1. 22
      extdep/CMakeLists.txt
  2. 5
      libdevcore/CMakeLists.txt
  3. 24
      libserpent/CMakeLists.txt
  4. 1
      libserpent/rewriter.cpp
  5. 1
      libserpent/util.cpp
  6. 1
      lllc/CMakeLists.txt
  7. 4
      solc/CMakeLists.txt

22
extdep/CMakeLists.txt

@ -6,7 +6,7 @@ include(eth_download.cmake)
# all dependencies will be installed into this directory, separated by platform
string(TOLOWER ${CMAKE_SYSTEM_NAME} _system_name)
set(ETH_DEPENDENCY_INSTALL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/install2/${_system_name}")
set(ETH_DEPENDENCY_INSTALL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/install/${_system_name}")
set(ETH_DEPENDENCY_SERVER "http://poc-7.ethdev.com/precompiled/${_system_name}")
file(MAKE_DIRECTORY ${ETH_DEPENDENCY_INSTALL_DIR}/lib)
file(MAKE_DIRECTORY ${ETH_DEPENDENCY_INSTALL_DIR}/include)
@ -14,22 +14,22 @@ file(MAKE_DIRECTORY ${ETH_DEPENDENCY_INSTALL_DIR}/bin)
if (ETH_COMPILE)
# json-rpc-cpp and its dependencies
#include(compile/jsoncpp.cmake)
#include(compile/argtable2.cmake)
#include(compile/curl.cmake)
#include(compile/json-rpc-cpp.cmake)
include(compile/jsoncpp.cmake)
include(compile/argtable2.cmake)
include(compile/curl.cmake)
include(compile/json-rpc-cpp.cmake)
# qt at its dependencies
#include(compile/icu.cmake)
#include(compile/jom.cmake)
#include(compile/qt.cmake)
include(compile/icu.cmake)
include(compile/jom.cmake)
include(compile/qt.cmake)
# leveldb and its dependencies
#include(compile/snappy.cmake)
#include(compile/leveldb.cmake)
include(compile/snappy.cmake)
include(compile/leveldb.cmake)
# cryptopp
#include(compile/cryptopp.cmake)
include(compile/cryptopp.cmake)
# boost
include(compile/boost.cmake)

5
libdevcore/CMakeLists.txt

@ -18,6 +18,11 @@ else()
add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS})
endif()
target_link_libraries(${EXECUTABLE} ${Boost_THREAD_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_DATE_TIME_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_SYSTEM_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_CHRONO_LIBRARY_RELEASE})
if (APPLE)
find_package(Threads REQUIRED)
target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})

24
libserpent/CMakeLists.txt

@ -5,6 +5,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")
aux_source_directory(. SRC_LIST)
include_directories(..)
set(EXECUTABLE serpent)
file(GLOB HEADERS "*.h")
@ -14,32 +16,10 @@ else()
add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS})
endif()
include_directories(..)
target_link_libraries(${EXECUTABLE} lll)
target_link_libraries(${EXECUTABLE} evmcore)
target_link_libraries(${EXECUTABLE} devcore)
if("${TARGET_PLATFORM}" STREQUAL "w64")
target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s)
target_link_libraries(${EXECUTABLE} iphlpapi)
target_link_libraries(${EXECUTABLE} ws2_32)
target_link_libraries(${EXECUTABLE} mswsock)
target_link_libraries(${EXECUTABLE} shlwapi)
elseif (APPLE)
# Latest mavericks boost libraries only come with -mt
target_link_libraries(${EXECUTABLE} boost_thread-mt)
find_package(Threads REQUIRED)
target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
elseif (UNIX)
target_link_libraries(${EXECUTABLE} ${Boost_THREAD_LIBRARY})
target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
else ()
target_link_libraries(${EXECUTABLE} boost_thread)
find_package(Threads REQUIRED)
target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
endif ()
install( TARGETS ${EXECUTABLE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib )
install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} )

1
libserpent/rewriter.cpp

@ -2,6 +2,7 @@
#include <iostream>
#include <vector>
#include <map>
#include <string>
#include "util.h"
#include "lllparser.h"
#include "bignum.h"

1
libserpent/util.cpp

@ -2,6 +2,7 @@
#include <iostream>
#include <vector>
#include <map>
#include <string>
#include "util.h"
#include "bignum.h"
#include <fstream>

1
lllc/CMakeLists.txt

@ -3,6 +3,7 @@ set(CMAKE_AUTOMOC OFF)
aux_source_directory(. SRC_LIST)
include_directories(${Boost_INCLUDE_DIRS})
include_directories(..)
set(EXECUTABLE lllc)

4
solc/CMakeLists.txt

@ -11,10 +11,6 @@ set(EXECUTABLE solc)
file(GLOB HEADERS "*.h")
add_executable(${EXECUTABLE} ${SRC_LIST} ${HEADERS})
target_link_libraries(${EXECUTABLE} ${Boost_THREAD_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_DATE_TIME_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_SYSTEM_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_CHRONO_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} solidity)
install( TARGETS ${EXECUTABLE} DESTINATION bin )

Loading…
Cancel
Save