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)