Browse Source

ethconsole on windows

cl-refactor
unknown 10 years ago
parent
commit
5bc72e037c
  1. 40
      cmake/Findv8.cmake
  2. 2
      ethconsole/CMakeLists.txt
  3. 5
      libjsconsole/CMakeLists.txt
  4. 2
      libjsconsole/JSConsole.h
  5. 2
      libjsengine/JSEngine.h

40
cmake/Findv8.cmake

@ -31,12 +31,44 @@ set(V8_LIBRARIES ${V8_LIBRARY})
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
find_library(
V8_LIBRARY_DEBUG
NAMES v8d
DOC "v8 debug library"
V8_BASE_LIBRARY
NAMES v8_base
DOC "v8 base library"
)
find_library(
V8_NO_SNAPSHOT_LIBRARY
NAMES v8_nosnapshot
DOC "v8 nosnapshot library"
)
find_library(
V8_SNAPSHOT_LIBRARY
NAMES v8_snapshot
DOC "v8 snapshotlibrary"
)
set(V8_LIBRARIES optimized ${V8_LIBRARIES} debug ${V8_LIBRARY_DEBUG})
set(V8_LIBRARIES ${V8_BASE_LIBRARY} ${V8_SNAPSHOT_LIBRARY} ${V8_NO_SNAPSHOT_LIBRARY})
find_library(
V8_BASE_LIBRARY_DEBUG
NAMES v8_based
DOC "v8 base library"
)
find_library(
V8_NO_SNAPSHOT_LIBRARY_DEBUG
NAMES v8_nosnapshotd
DOC "v8 nosnapshot library"
)
find_library(
V8_SNAPSHOT_LIBRARY_DEBUG
NAMES v8_snapshotd
DOC "v8 snapshotlibrary"
)
set(V8_LIBRARIES optimized ${V8_LIBRARIES} debug ${V8_BASE_LIBRARY_DEBUG} ${V8_SNAPSHOT_LIBRARY_DEBUG} ${V8_NO_SNAPSHOT_LIBRARY_DEBUG})
endif()

2
ethconsole/CMakeLists.txt

@ -13,9 +13,7 @@ set(EXECUTABLE ethconsole)
file(GLOB HEADERS "*.h")
add_executable(${EXECUTABLE} ${SRC_LIST} ${HEADERS})
target_link_libraries(${EXECUTABLE} ${Boost_REGEX_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${READLINE_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${CURL_LIBRARIES})
if (DEFINED WIN32 AND NOT DEFINED CMAKE_COMPILER_IS_MINGW)

5
libjsconsole/CMakeLists.txt

@ -12,7 +12,9 @@ aux_source_directory(. SRC_LIST)
include_directories(BEFORE ${V8_INCLUDE_DIRS})
include_directories(BEFORE ..)
include_directories(${READLINE_INCLUDE_DIRS})
if (READLINE_FOUND)
include_directories(${READLINE_INCLUDE_DIRS})
endif()
include_directories(${JSON_RPC_CPP_INCLUDE_DIRS})
include_directories(${CURL_INCLUDE_DIRS})
@ -31,6 +33,7 @@ target_link_libraries(${EXECUTABLE} ${JSON_RPC_CPP_SERVER_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${CURL_LIBRARIES})
if (DEFINED WIN32 AND NOT DEFINED CMAKE_COMPILER_IS_MINGW)
target_link_libraries(${EXECUTABLE} "ws2_32" "winmm")
eth_copy_dlls(${EXECUTABLE} CURL_DLLS)
endif()

2
libjsconsole/JSConsole.h

@ -65,7 +65,7 @@ public:
free(buff);
}
#else
std::cout << propmtForIndentionLevel(openBrackets) << std::endl << std::flush;
std::cout << promptForIndentionLevel(openBrackets) << std::endl << std::flush;
std::getline(std::cin, rl);
#endif
if (rl.length() > 0)

2
libjsengine/JSEngine.h

@ -29,7 +29,7 @@ namespace eth
{
class JSException: public std::exception {};
class JSPrintException: public JSException { char const* what() const noexcept { return "Cannot print expression!"; } };
class JSPrintException: public JSException { char const* what() const { return "Cannot print expression!"; } };
class JSString
{

Loading…
Cancel
Save