cmake_minimum_required(VERSION 3.6.2)
project(flippR_driver_networking)

set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin/networking)
set(SOURCES
        input/InputSocketHandler.cpp
        output/OutputRequestHandler.cpp
        output/OutputRequestHandlerFactory.cpp
        FlippRServer.cpp 
        input/InputSocketHandlerFactory.cpp
        )

add_executable(${PROJECT_NAME} ${SOURCES})

target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src)
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/include)

target_link_libraries(${PROJECT_NAME} PRIVATE FlippR-Driver)

####################### POCO ##############################
find_package(Poco REQUIRED COMPONENTS Foundation Net JSON Util)

if(NOT Poco_FOUND)
    message(FATAL_ERROR, "Could not find libPoco")
endif()

target_link_libraries(${PROJECT_NAME} PUBLIC Poco::Foundation Poco::Net Poco::JSON Poco::Util)
