Commit f203aa7e authored by Andrew Wiley's avatar Andrew Wiley

fix Windows MinGW64 build

parent 66d554bc
...@@ -5,7 +5,11 @@ add_custom_target(all_examples) ...@@ -5,7 +5,11 @@ add_custom_target(all_examples)
macro(add name folder) macro(add name folder)
add_executable(${name} ${folder}/${name}.cpp ${ARGN}) add_executable(${name} ${folder}/${name}.cpp ${ARGN})
target_link_libraries(${name} ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES}) if (${CMAKE_SYSTEM_NAME} MATCHES "Window")
target_link_libraries(${name} ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES} -lws2_32)
else ()
target_link_libraries(${name} ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES})
endif ()
add_dependencies(${name} all_examples) add_dependencies(${name} all_examples)
endmacro() endmacro()
......
...@@ -15,7 +15,11 @@ ...@@ -15,7 +15,11 @@
#include <cassert> #include <cassert>
#include <iostream> #include <iostream>
#ifdef WIN32
#include <Winsock2.h>
#else
#include <arpa/inet.h> // htonl #include <arpa/inet.h> // htonl
#endif
#include "cppa/cppa.hpp" #include "cppa/cppa.hpp"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment