

cmake_minimum_required(VERSION 3.8.0)
project(mdd_lib)

add_library(${PROJECT_NAME} STATIC
        include/HandlerModule
        include/Input.h
        include/IListener.h
        include/IModule.h
        include/Input.h
        include/IOutput.h
        include/IProcessor.h
        include/IUnique.h
        include/ModuleBase.h
        include/ModuleHTTP.h
        include/ModuleMath.h
        include/ModuleSwitch.h
        include/Output.h
        include/ProcessorBase.h
        include/ProcessorManual.h

        src/Input.cpp
        src/ModuleBase.cpp
        src/ModuleHTTP.cpp
        src/ModuleMath.cpp
        src/ModuleSwitch.cpp
        src/Output.cpp
        src/ProcessorBase.cpp
        src/ProcessorManual.cpp
        )

target_include_directories(${PROJECT_NAME} PUBLIC
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
        $<INSTALL_INTERFACE:include>)

target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})

install(DIRECTORY include DESTINATION .)

install(TARGETS ${PROJECT_NAME} DESTINATION lib/$<CONFIG> EXPORT targets)
install(EXPORT targets DESTINATION cmake)


if(${TESTS_ENABLED})
    add_subdirectory(test)
endif()