cmake_minimum_required(VERSION 3.16)
project(knx-linux VERSION 1.5)
set(LIBRARIES_FROM_REFERENCES "")

set(SOURCES
./knx/application_layer/apdu.cpp
./knx/application_layer/apdu.h
./knx/application_layer/application_layer.cpp
./knx/application_layer/application_layer.h
./knx/bau/bau.cpp
./knx/bau/bau.h
./knx/bau/bau_systemB.cpp
./knx/bau/bau_systemB.h
./knx/coupler/bau_systemB_coupler.cpp
./knx/coupler/bau_systemB_coupler.h
./knx/bau/bau_systemB_device.cpp
./knx/bau/bau_systemB_device.h
./knx/bits.cpp
./knx/bits.h
./knx/cemi_server/cemi_server.cpp
./knx/cemi_server/cemi_server.h
./knx/cemi_server/cemi_server_object.cpp
./knx/cemi_server/cemi_server_object.h
./knx/cemi_server/usb_tunnel_interface.cpp
./knx/cemi_server/usb_tunnel_interface.h
./knx/config.h
./knx/coupler/bau091A.cpp
./knx/coupler/bau091A.h
./knx/coupler/bau2920.cpp
./knx/coupler/bau2920.h
./knx/coupler/router_object.cpp
./knx/coupler/router_object.h
./knx/datalink_layer/cemi_frame.cpp
./knx/datalink_layer/cemi_frame.h
./knx/datalink_layer/data_link_layer.cpp
./knx/datalink_layer/data_link_layer.h
./knx/data_secure/secure_application_layer.cpp
./knx/data_secure/secure_application_layer.h
./knx/data_secure/security_interface_object.cpp
./knx/data_secure/security_interface_object.h
./knx/group_object/dpt/dpts.h
./knx/group_object/dpt/dpt.h
./knx/group_object/dpt/dpt1.cpp
./knx/group_object/dpt/dpt1.h
./knx/group_object/dpt/dpt2.h
./knx/group_object/dpt/dpt3.h
./knx/group_object/dpt/dpt4.cpp
./knx/group_object/dpt/dpt4.h
./knx/group_object/dpt/dpt5.cpp
./knx/group_object/dpt/dpt5.h
./knx/group_object/dpt/dpt6.cpp
./knx/group_object/dpt/dpt6.h
./knx/group_object/dpt/dpt7.cpp
./knx/group_object/dpt/dpt7.h
./knx/group_object/dpt/dpt8.cpp
./knx/group_object/dpt/dpt8.h
./knx/group_object/dpt/dpt9.cpp
./knx/group_object/dpt/dpt9.h
./knx/group_object/dpt/dptconvert.cpp
./knx/group_object/dpt/dptconvert.h
./knx/group_object/group_object.cpp
./knx/group_object/group_object.h
./knx/group_object/knx_value.cpp
./knx/group_object/knx_value.h
./knx/interface_object/address_table_object.cpp
./knx/interface_object/address_table_object.h
./knx/interface_object/application_program_object.cpp
./knx/interface_object/application_program_object.h
./knx/interface_object/association_table_object.cpp
./knx/interface_object/association_table_object.h
./knx/interface_object/callback_property.h
./knx/interface_object/data_property.cpp
./knx/interface_object/data_property.h
./knx/interface_object/device_object.cpp
./knx/interface_object/device_object.h
./knx/interface_object/function_property.h
./knx/interface_object/group_object_table_object.cpp
./knx/interface_object/group_object_table_object.h
./knx/interface_object/interface_object.cpp
./knx/interface_object/interface_object.h
./knx/interface_object/property.cpp
./knx/interface_object/property.h
./knx/interface_object/table_object.cpp
./knx/interface_object/table_object.h
./knx/ip/bau57B0.cpp
./knx/ip/bau57B0.h
./knx/ip/ip_data_link_layer.cpp
./knx/ip/ip_data_link_layer.h
./knx/ip/ip_host_protocol_address_information.cpp
./knx/ip/ip_host_protocol_address_information.h
./knx/ip/ip_parameter_object.cpp
./knx/ip/ip_parameter_object.h
./knx/ip/knx_ip_ch.cpp
./knx/ip/knx_ip_ch.h
./knx/ip/knx_ip_config_dib.cpp
./knx/ip/knx_ip_config_dib.h
./knx/ip/knx_ip_config_request.cpp
./knx/ip/knx_ip_config_request.h
./knx/ip/knx_ip_connect_request.cpp
./knx/ip/knx_ip_connect_request.h
./knx/ip/knx_ip_connect_response.cpp
./knx/ip/knx_ip_connect_response.h
./knx/ip/knx_ip_crd.cpp
./knx/ip/knx_ip_crd.h
./knx/ip/knx_ip_cri.cpp
./knx/ip/knx_ip_cri.h
./knx/ip/knx_ip_description_request.cpp
./knx/ip/knx_ip_description_request.h
./knx/ip/knx_ip_description_response.cpp
./knx/ip/knx_ip_description_response.h
./knx/ip/knx_ip_device_information_dib.cpp
./knx/ip/knx_ip_device_information_dib.h
./knx/ip/knx_ip_dib.cpp
./knx/ip/knx_ip_dib.h
./knx/ip/knx_ip_disconnect_request.cpp
./knx/ip/knx_ip_disconnect_request.h
./knx/ip/knx_ip_disconnect_response.cpp
./knx/ip/knx_ip_disconnect_response.h
./knx/ip/knx_ip_extended_device_information_dib.cpp
./knx/ip/knx_ip_extended_device_information_dib.h
./knx/ip/knx_ip_frame.cpp
./knx/ip/knx_ip_frame.h
./knx/ip/knx_ip_knx_addresses_dib.cpp
./knx/ip/knx_ip_knx_addresses_dib.h
./knx/ip/knx_ip_routing_indication.cpp
./knx/ip/knx_ip_routing_indication.h
./knx/ip/knx_ip_search_request.cpp
./knx/ip/knx_ip_search_request.h
./knx/ip/knx_ip_search_request_extended.cpp
./knx/ip/knx_ip_search_request_extended.h
./knx/ip/knx_ip_search_response.cpp
./knx/ip/knx_ip_search_response.h
./knx/ip/knx_ip_search_response_extended.cpp
./knx/ip/knx_ip_search_response_extended.h
./knx/ip/knx_ip_state_request.cpp
./knx/ip/knx_ip_state_request.h
./knx/ip/knx_ip_state_response.cpp
./knx/ip/knx_ip_state_response.h
./knx/ip/knx_ip_supported_service_dib.cpp
./knx/ip/knx_ip_supported_service_dib.h
./knx/ip/knx_ip_tunneling_ack.cpp
./knx/ip/knx_ip_tunneling_ack.h
./knx/ip/knx_ip_tunneling_info_dib.cpp
./knx/ip/knx_ip_tunneling_info_dib.h
./knx/ip/knx_ip_tunneling_request.cpp
./knx/ip/knx_ip_tunneling_request.h
./knx/ip/knx_ip_tunnel_connection.cpp
./knx/ip/knx_ip_tunnel_connection.h
./knx/ip/service_families.h
./knx/knx_facade.cpp
./knx/knx_facade.h
./knx/knx_types.cpp
./knx/knx_types.h
./knx/network_layer/network_layer.cpp
./knx/network_layer/network_layer.h
./knx/coupler/network_layer_coupler.cpp
./knx/coupler/network_layer_coupler.h
./knx/network_layer/network_layer_device.cpp
./knx/network_layer/network_layer_device.h
./knx/network_layer/network_layer_entity.cpp
./knx/network_layer/network_layer_entity.h
./knx/network_layer/npdu.cpp
./knx/network_layer/npdu.h
./knx/platform/linux_platform.cpp
./knx/platform/linux_platform.h
./knx/platform/platform.cpp
./knx/platform/platform.h
./knx/rf/bau27B0.cpp
./knx/rf/bau27B0.h
./knx/rf/rf_data_link_layer.cpp
./knx/rf/rf_data_link_layer.h
./knx/rf/rf_medium_object.cpp
./knx/rf/rf_medium_object.h
./knx/rf/rf_physical_layer.h
./knx/rf/rf_physical_layer_cc1101.cpp
./knx/rf/rf_physical_layer_cc1101.h
./knx/rf/rf_physical_layer_cc1310.cpp
./knx/rf/rf_physical_layer_cc1310.h
./knx/tp/bau07B0.cpp
./knx/tp/bau07B0.h
./knx/tp/tpuart_data_link_layer.cpp
./knx/tp/tpuart_data_link_layer.h
./knx/tp/tp_frame.cpp
./knx/tp/tp_frame.h
./knx/transport_layer/tpdu.cpp
./knx/transport_layer/tpdu.h
./knx/transport_layer/transport_layer.cpp
./knx/transport_layer/transport_layer.h
./knx/util/aes.c
./knx/util/aes.h
./knx/util/aes.hpp
./knx/util/logger.cpp
./knx/util/logger.h
./knx/util/memory.cpp
./knx/util/memory.h
./knx/util/save_restore.h
./knx/util/simple_map.h
./knx.h
)


set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -g -O0")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -g -O0")
SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -fPIC -DKNX_FLASH_SIZE=0x20000")

add_library(knx ${SOURCES})
target_include_directories(knx PUBLIC .)
set_property(TARGET knx PROPERTY CXX_STANDARD 17)
target_compile_definitions(knx PUBLIC)
install(TARGETS knx DESTINATION lib)