diff --git a/cmake/FindCURL.cmake b/cmake/FindCURL.cmake index e2f52fe79..f9d2693ec 100644 --- a/cmake/FindCURL.cmake +++ b/cmake/FindCURL.cmake @@ -39,6 +39,13 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") set(CURL_LIBRARIES optimized ${CURL_LIBRARIES} debug ${CURL_LIBRARY_DEBUG}) + # prepare dlls + string(REPLACE ".lib" ".dll" CURL_DLL ${CURL_LIBRARY}) + string(REPLACE "/lib/" "/bin/" CURL_DLL ${CURL_DLL}) + string(REPLACE ".lib" ".dll" CURL_DLL_DEBUG ${CURL_LIBRARY_DEBUG}) + string(REPLACE "/lib/" "/bin/" CURL_DLL_DEBUG ${CURL_DLL_DEBUG}) + set(CURL_DLLS optimized ${CURL_DLL} debug ${CURL_DLL_DEBUG}) + endif() # handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE diff --git a/eth/CMakeLists.txt b/eth/CMakeLists.txt index 75e0b9e04..649d7a2d3 100644 --- a/eth/CMakeLists.txt +++ b/eth/CMakeLists.txt @@ -22,8 +22,10 @@ if (READLINE_FOUND) endif() if (JSONRPC) - target_link_libraries(${EXECUTABLE} ${JSON_RPC_CPP_CLIENT_LIBRARIES}) target_link_libraries(${EXECUTABLE} web3jsonrpc) + target_link_libraries(${EXECUTABLE} ${JSON_RPC_CPP_CLIENT_LIBRARIES}) + target_link_libraries(${EXECUTABLE} ${CURL_LIBRARIES}) + eth_copy_dlls(${EXECUTABLE} CURL_DLLS) endif() target_link_libraries(${EXECUTABLE} webthree)