cmake_minimum_required(VERSION 3.10)
project(MyServerProject)

set(CMAKE_CXX_STANDARD 17)



# Include the nlohmann/json library
find_package(nlohmann_json REQUIRED)
find_package(msgpack REQUIRED)

include_directories(${CMAKE_SOURCE_DIR}/src)
include_directories(${CMAKE_SOURCE_DIR}/plugins)

add_subdirectory(external/serio)

# Main server executable
add_executable(server
    src/main.cpp
    src/Server.cpp
    src/IPC.cpp
    src/Config.cpp
)

# Link libraries
target_link_libraries(server ${SERIO_LIBRARIES} nlohmann_json::nlohmann_json)
target_include_directories(server PUBLIC ${SERIO_INCLUDE_DIRS})
message(STATUS "Serio: \n\t${SERIO_LIBRARIES} \n\t${SERIO_INCLUDE_DIRS}")
# Add the plugins subdirectory
add_subdirectory(src/plugins)
