Browse Source

Merge pull request #2490 from arkpar/win-jit-dll

Copy evmjit.dll to output on windows
cl-refactor
Gav Wood 10 years ago
parent
commit
cab247921d
  1. 4
      CMakeLists.txt
  2. 2
      alethzero/CMakeLists.txt
  3. 14
      cmake/EthExecutableHelper.cmake
  4. 5
      eth/CMakeLists.txt

4
CMakeLists.txt

@ -360,6 +360,10 @@ if (EVMJIT)
endif()
set(EVMJIT_CPP TRUE) # include CPP-JIT connector
add_subdirectory(evmjit)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(EVMJIT_DLLS_LOCAL $<TARGET_FILE:evmjit>)
set(EVMJIT_DLLS optimized ${EVMJIT_DLLS_LOCAL} debug ${EVMJIT_DLLS_LOCAL})
endif()
endif()
if (TOOLS OR GUI OR SOLIDITY OR TESTS)

2
alethzero/CMakeLists.txt

@ -72,5 +72,5 @@ if (SERPENT)
endif()
# eth_install_executable is defined in cmake/EthExecutableHelper.cmake
eth_install_executable(${EXECUTABLE} DLLS MHD_DLLS)
eth_install_executable(${EXECUTABLE} DLLS MHD_DLLS EVMJIT_DLLS OpenCL_DLLS)

14
cmake/EthExecutableHelper.cmake

@ -43,11 +43,11 @@ macro(eth_add_executable EXECUTABLE)
endmacro()
macro(eth_copy_dlls EXECUTABLE DLLS)
macro(eth_copy_dll EXECUTABLE DLL)
# dlls must be unsubstitud list variable (without ${}) in format
# optimized;path_to_dll.dll;debug;path_to_dlld.dll
list(GET ${DLLS} 1 DLL_RELEASE)
list(GET ${DLLS} 3 DLL_DEBUG)
list(GET ${DLL} 1 DLL_RELEASE)
list(GET ${DLL} 3 DLL_DEBUG)
add_custom_command(TARGET ${EXECUTABLE}
POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS
@ -59,6 +59,12 @@ macro(eth_copy_dlls EXECUTABLE DLLS)
)
endmacro()
macro(eth_copy_dlls EXECUTABLE)
foreach(dll ${ARGN})
eth_copy_dll(${EXECUTABLE} ${dll})
endforeach(dll)
endmacro()
#
# this function requires the following variables to be specified:
# ETH_DEPENDENCY_INSTALL_DIR
@ -124,7 +130,7 @@ macro(eth_install_executable EXECUTABLE)
#copy additional dlls
foreach(dll ${ETH_INSTALL_EXECUTABLE_DLLS})
eth_copy_dlls(${EXECUTABLE} ${dll})
eth_copy_dll(${EXECUTABLE} ${dll})
endforeach(dll)
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Debug"

5
eth/CMakeLists.txt

@ -41,9 +41,8 @@ if (JSCONSOLE)
target_link_libraries(${EXECUTABLE} jsconsole)
endif()
if (DEFINED WIN32 AND NOT DEFINED CMAKE_COMPILER_IS_MINGW)
eth_copy_dlls("${EXECUTABLE}" MHD_DLLS)
eth_copy_dlls("${EXECUTABLE}" OpenCL_DLLS)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
eth_copy_dlls("${EXECUTABLE}" MHD_DLLS EVMJIT_DLLS OpenCL_DLLS)
endif()
if (APPLE)

Loading…
Cancel
Save