set(platform_INCLUDES)
if(UNIX)
list(APPEND platform_INCLUDES 
    sockets/UnixSocketInterface.cpp)
endif()

list(APPEND network_HEADERS 
    NetworkManager.h
    sockets/Socket.h
    sockets/SocketInterface.h
    sockets/ISocketMessageHandler.h
    )

list(APPEND network_LIB_INCLUDES 
    NetworkManager.cpp
    sockets/Socket.cpp
    web/HttpMessageHandler.cpp
    )

add_library(network SHARED ${network_LIB_INCLUDES} ${platform_INCLUDES} ${network_HEADERS})

target_include_directories(network PUBLIC
                          "${CMAKE_CURRENT_SOURCE_DIR}"
                          "${CMAKE_CURRENT_SOURCE_DIR}/sockets"
                          "${CMAKE_CURRENT_SOURCE_DIR}/web"
                          )
set_target_properties( network PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON )                          
target_link_libraries( network PUBLIC core)

set_property(TARGET network PROPERTY FOLDER src)