From 36603d62e7e61b50cb0607183aadca71cc38b737 Mon Sep 17 00:00:00 2001 From: Davide Magrin Date: Sun, 16 Jan 2022 18:59:06 +0100 Subject: [PATCH] Add CMakeLists.txt files --- CMakeLists.txt | 118 ++++++++++++++++++++++++++++++++++++++++ examples/CMakeLists.txt | 63 +++++++++++++++++++++ 2 files changed, 181 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 examples/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000..39d434ee3c --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,118 @@ +set(name lorawan) + +set(source_files + model/lora-net-device.cc + model/lorawan-mac.cc + model/lora-phy.cc + model/building-penetration-loss.cc + model/correlated-shadowing-propagation-loss-model.cc + model/lora-channel.cc + model/lora-interference-helper.cc + model/gateway-lorawan-mac.cc + model/end-device-lorawan-mac.cc + model/class-a-end-device-lorawan-mac.cc + model/gateway-lora-phy.cc + model/end-device-lora-phy.cc + model/simple-end-device-lora-phy.cc + model/simple-gateway-lora-phy.cc + model/sub-band.cc + model/logical-lora-channel.cc + model/logical-lora-channel-helper.cc + model/periodic-sender.cc + model/one-shot-sender.cc + model/forwarder.cc + model/lorawan-mac-header.cc + model/lora-frame-header.cc + model/mac-command.cc + model/lora-device-address.cc + model/lora-device-address-generator.cc + model/lora-tag.cc + model/network-server.cc + model/network-status.cc + model/network-controller.cc + model/network-controller-components.cc + model/network-scheduler.cc + model/end-device-status.cc + model/gateway-status.cc + model/lora-radio-energy-model.cc + model/lora-tx-current-model.cc + model/lora-utils.cc + model/adr-component.cc + model/hex-grid-position-allocator.cc + helper/lora-radio-energy-model-helper.cc + helper/lora-helper.cc + helper/lora-phy-helper.cc + helper/lorawan-mac-helper.cc + helper/periodic-sender-helper.cc + helper/one-shot-sender-helper.cc + helper/forwarder-helper.cc + helper/network-server-helper.cc + helper/lora-packet-tracker.cc +) + +set(header_files + model/lora-net-device.h + model/lorawan-mac.h + model/lora-phy.h + model/building-penetration-loss.h + model/correlated-shadowing-propagation-loss-model.h + model/lora-channel.h + model/lora-interference-helper.h + model/gateway-lorawan-mac.h + model/end-device-lorawan-mac.h + model/class-a-end-device-lorawan-mac.h + model/gateway-lora-phy.h + model/end-device-lora-phy.h + model/simple-end-device-lora-phy.h + model/simple-gateway-lora-phy.h + model/sub-band.h + model/logical-lora-channel.h + model/logical-lora-channel-helper.h + model/periodic-sender.h + model/one-shot-sender.h + model/forwarder.h + model/lorawan-mac-header.h + model/lora-frame-header.h + model/mac-command.h + model/lora-device-address.h + model/lora-device-address-generator.h + model/lora-tag.h + model/network-server.h + model/network-status.h + model/network-controller.h + model/network-controller-components.h + model/network-scheduler.h + model/end-device-status.h + model/gateway-status.h + model/lora-radio-energy-model.h + model/lora-tx-current-model.h + model/lora-utils.h + model/adr-component.h + model/hex-grid-position-allocator.h + helper/lora-radio-energy-model-helper.h + helper/lora-helper.h + helper/lora-phy-helper.h + helper/lorawan-mac-helper.h + helper/periodic-sender-helper.h + helper/one-shot-sender-helper.h + helper/forwarder-helper.h + helper/network-server-helper.h + helper/lora-packet-tracker.h + test/utilities.h +) + +set(libraries_to_link ${libnetwork} ${libpropagation} ${libenergy} + ${libpoint-to-point} ${libbuildings} ${libmobility} +) + +set(test_sources + test/utilities.cc + test/lorawan-test-suite.cc + test/network-status-test-suite.cc + test/network-scheduler-test-suite.cc + test/network-server-test-suite.cc +) + +build_lib("${name}" "${source_files}" "${header_files}" "${libraries_to_link}" + "${test_sources}" +) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000000..62da8a5bae --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,63 @@ +set(name simple-network-example) +set(source_files ${name}.cc) +set(header_files) +set(libraries_to_link ${libcore} ${liblorawan}) +build_lib_example( + "${name}" "${source_files}" "${header_files}" "${libraries_to_link}" +) + +set(name network-server-example) +set(source_files ${name}.cc) +set(header_files) +set(libraries_to_link ${libcore} ${liblorawan}) +build_lib_example( + "${name}" "${source_files}" "${header_files}" "${libraries_to_link}" +) + +set(name complete-network-example) +set(source_files ${name}.cc) +set(header_files) +set(libraries_to_link ${libcore} ${liblorawan}) +build_lib_example( + "${name}" "${source_files}" "${header_files}" "${libraries_to_link}" +) + +set(name adr-example) +set(source_files ${name}.cc) +set(header_files) +set(libraries_to_link ${libcore} ${liblorawan}) +build_lib_example( + "${name}" "${source_files}" "${header_files}" "${libraries_to_link}" +) + +set(name energy-model-example) +set(source_files ${name}.cc) +set(header_files) +set(libraries_to_link ${libcore} ${liblorawan}) +build_lib_example( + "${name}" "${source_files}" "${header_files}" "${libraries_to_link}" +) + +set(name aloha-throughput) +set(source_files ${name}.cc) +set(header_files) +set(libraries_to_link ${libcore} ${liblorawan}) +build_lib_example( + "${name}" "${source_files}" "${header_files}" "${libraries_to_link}" +) + +set(name parallel-reception-example) +set(source_files ${name}.cc) +set(header_files) +set(libraries_to_link ${libcore} ${liblorawan}) +build_lib_example( + "${name}" "${source_files}" "${header_files}" "${libraries_to_link}" +) + +set(name frame-counter-update) +set(source_files ${name}.cc) +set(header_files) +set(libraries_to_link ${libcore} ${liblorawan}) +build_lib_example( + "${name}" "${source_files}" "${header_files}" "${libraries_to_link}" +)