cmake_minimum_required(VERSION 3.20)
project(LCP VERSION 0.2.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_AUTOUIC OFF)
set(CMAKE_AUTOMOC OFF)
set(CMAKE_AUTORCC OFF)

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG")
endif()

add_compile_definitions(BUILT_WITH_CMAKE)
configure_file(config.h.in config.h)

add_library(${PROJECT_NAME} STATIC)
# E1.11
include(dmx/CMakeLists.txt)
# E1.17
include(acn/CMakeLists.txt)
# E1.20
include(rdm/CMakeLists.txt)
# E1.31
include(sacn/CMakeLists.txt)
# E1.33
include(rdmnet/CMakeLists.txt)
# E1.56
include(otp/CMakeLists.txt)

set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})

target_compile_definitions(${PROJECT_NAME} PUBLIC ${PROJECT_NAME}_LIBRARY)
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
