From dadac26d0eff896056f1b3bfc18a09df512bb9e4 Mon Sep 17 00:00:00 2001 From: lotrf3 Date: Tue, 26 May 2015 02:18:19 -0500 Subject: [PATCH 1/3] Added upnp support to Windows --- alethzero/CMakeLists.txt | 1 + eth/CMakeLists.txt | 1 + extdep/getstuff.bat | 1 + test/CMakeLists.txt | 1 + 4 files changed, 4 insertions(+) diff --git a/alethzero/CMakeLists.txt b/alethzero/CMakeLists.txt index 595668cd1..9738ec765 100644 --- a/alethzero/CMakeLists.txt +++ b/alethzero/CMakeLists.txt @@ -42,6 +42,7 @@ eth_add_executable(${EXECUTABLE} add_dependencies(${EXECUTABLE} BuildInfo.h) +target_link_libraries(${EXECUTABLE} Iphlpapi) target_link_libraries(${EXECUTABLE} Qt5::Core) target_link_libraries(${EXECUTABLE} Qt5::Widgets) target_link_libraries(${EXECUTABLE} Qt5::WebEngine) diff --git a/eth/CMakeLists.txt b/eth/CMakeLists.txt index d317be28a..7246ea54e 100644 --- a/eth/CMakeLists.txt +++ b/eth/CMakeLists.txt @@ -19,6 +19,7 @@ add_executable(${EXECUTABLE} ${SRC_LIST} ${HEADERS}) add_dependencies(${EXECUTABLE} BuildInfo.h) +target_link_libraries(${EXECUTABLE} Iphlpapi) target_link_libraries(${EXECUTABLE} ${Boost_REGEX_LIBRARIES}) if (READLINE_FOUND) diff --git a/extdep/getstuff.bat b/extdep/getstuff.bat index b9bd6ab19..3b41f9e96 100644 --- a/extdep/getstuff.bat +++ b/extdep/getstuff.bat @@ -13,6 +13,7 @@ call :download json-rpc-cpp 0.5.0 call :download leveldb 1.2 call :download microhttpd 0.9.2 call :download qt 5.4.1 +call :download miniupnpc 1.9 goto :EOF diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 39a235c58..be24ea115 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -69,6 +69,7 @@ endforeach(file) file(GLOB HEADERS "*.h") add_executable(testeth ${SRC_LIST} ${HEADERS}) +target_link_libraries(testeth Iphlpapi) target_link_libraries(testeth ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES}) target_link_libraries(testeth ${CURL_LIBRARIES}) target_link_libraries(testeth ethereum) From 65cbeafd583ec9ca664d92a58674b99bdc45dca1 Mon Sep 17 00:00:00 2001 From: lotrf3 Date: Tue, 26 May 2015 14:09:15 -0500 Subject: [PATCH 2/3] Ensure dependencies are conditional on Windows --- alethzero/CMakeLists.txt | 4 +++- eth/CMakeLists.txt | 4 +++- test/CMakeLists.txt | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/alethzero/CMakeLists.txt b/alethzero/CMakeLists.txt index 9738ec765..56ab82228 100644 --- a/alethzero/CMakeLists.txt +++ b/alethzero/CMakeLists.txt @@ -42,7 +42,9 @@ eth_add_executable(${EXECUTABLE} add_dependencies(${EXECUTABLE} BuildInfo.h) -target_link_libraries(${EXECUTABLE} Iphlpapi) +if((WIN32) + target_link_libraries(${EXECUTABLE} Iphlpapi) +endif() target_link_libraries(${EXECUTABLE} Qt5::Core) target_link_libraries(${EXECUTABLE} Qt5::Widgets) target_link_libraries(${EXECUTABLE} Qt5::WebEngine) diff --git a/eth/CMakeLists.txt b/eth/CMakeLists.txt index 7246ea54e..416155687 100644 --- a/eth/CMakeLists.txt +++ b/eth/CMakeLists.txt @@ -19,7 +19,9 @@ add_executable(${EXECUTABLE} ${SRC_LIST} ${HEADERS}) add_dependencies(${EXECUTABLE} BuildInfo.h) -target_link_libraries(${EXECUTABLE} Iphlpapi) +if((WIN32) + target_link_libraries(${EXECUTABLE} Iphlpapi) +endif() target_link_libraries(${EXECUTABLE} ${Boost_REGEX_LIBRARIES}) if (READLINE_FOUND) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index be24ea115..a3b3188a9 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -69,7 +69,9 @@ endforeach(file) file(GLOB HEADERS "*.h") add_executable(testeth ${SRC_LIST} ${HEADERS}) -target_link_libraries(testeth Iphlpapi) +if((WIN32) + target_link_libraries(testeth Iphlpapi) +endif() target_link_libraries(testeth ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES}) target_link_libraries(testeth ${CURL_LIBRARIES}) target_link_libraries(testeth ethereum) From 192e8e19f2023c980a2a4b936a58cd967b768573 Mon Sep 17 00:00:00 2001 From: lotrf3 Date: Tue, 26 May 2015 14:24:58 -0500 Subject: [PATCH 3/3] Fix dumbest syntax error ever --- alethzero/CMakeLists.txt | 2 +- eth/CMakeLists.txt | 2 +- test/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/alethzero/CMakeLists.txt b/alethzero/CMakeLists.txt index 56ab82228..bda66ede2 100644 --- a/alethzero/CMakeLists.txt +++ b/alethzero/CMakeLists.txt @@ -42,7 +42,7 @@ eth_add_executable(${EXECUTABLE} add_dependencies(${EXECUTABLE} BuildInfo.h) -if((WIN32) +if(WIN32) target_link_libraries(${EXECUTABLE} Iphlpapi) endif() target_link_libraries(${EXECUTABLE} Qt5::Core) diff --git a/eth/CMakeLists.txt b/eth/CMakeLists.txt index 416155687..7396c9ccb 100644 --- a/eth/CMakeLists.txt +++ b/eth/CMakeLists.txt @@ -19,7 +19,7 @@ add_executable(${EXECUTABLE} ${SRC_LIST} ${HEADERS}) add_dependencies(${EXECUTABLE} BuildInfo.h) -if((WIN32) +if(WIN32) target_link_libraries(${EXECUTABLE} Iphlpapi) endif() target_link_libraries(${EXECUTABLE} ${Boost_REGEX_LIBRARIES}) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a3b3188a9..69a3d51e7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -69,7 +69,7 @@ endforeach(file) file(GLOB HEADERS "*.h") add_executable(testeth ${SRC_LIST} ${HEADERS}) -if((WIN32) +if(WIN32) target_link_libraries(testeth Iphlpapi) endif() target_link_libraries(testeth ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})