From 606b4ba00ceb7f240d9dbc598b28c4acb177aa86 Mon Sep 17 00:00:00 2001 From: Filippo Gentile Date: Sun, 9 Apr 2023 21:04:54 +0200 Subject: [PATCH] Directory layout change - Z21 Arduino library is moved to "z21library" subdir - Arduino compatibility code is moved to "arduino_compat" subdir --- CMakeLists.txt | 13 +++++++++---- EEPROM.h => arduino_compat/EEPROM.h | 2 +- WProgram.h => arduino_compat/WProgram.h | 2 +- .../arduinocompat.cpp | 0 arduinocompat.h => arduino_compat/arduinocompat.h | 0 z21.cpp => z21library/z21.cpp | 0 z21.h => z21library/z21.h | 0 z21header.h => z21library/z21header.h | 0 8 files changed, 11 insertions(+), 6 deletions(-) rename EEPROM.h => arduino_compat/EEPROM.h (79%) rename WProgram.h => arduino_compat/WProgram.h (80%) rename arduinocompat.cpp => arduino_compat/arduinocompat.cpp (100%) rename arduinocompat.h => arduino_compat/arduinocompat.h (100%) rename z21.cpp => z21library/z21.cpp (100%) rename z21.h => z21library/z21.h (100%) rename z21header.h => z21library/z21header.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index a1d3bca..781278f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,11 +24,14 @@ set(PROJECT_SOURCES z21.h z21.cpp - arduinocompat.h - arduinocompat.cpp + arduino_compat/WProgram.h + arduino_compat/EEPROM.h + arduino_compat/arduinocompat.h + arduino_compat/arduinocompat.cpp - WProgram.h - EEPROM.h + z21library/z21header.h + z21library/z21.h + z21library/z21.cpp ) if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) @@ -54,6 +57,8 @@ else() endif() endif() +target_include_directories(Z21ServerEmulator PRIVATE z21library arduino_compat) + target_link_libraries(Z21ServerEmulator PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network) set_target_properties(Z21ServerEmulator PROPERTIES diff --git a/EEPROM.h b/arduino_compat/EEPROM.h similarity index 79% rename from EEPROM.h rename to arduino_compat/EEPROM.h index bcbc446..0626fe4 100644 --- a/EEPROM.h +++ b/arduino_compat/EEPROM.h @@ -6,6 +6,6 @@ * This header is provided to use Z21 Library without source modifications */ -#include "arduinocompat.h" +#include "arduino_compat/arduinocompat.h" #endif // EEPROM_H diff --git a/WProgram.h b/arduino_compat/WProgram.h similarity index 80% rename from WProgram.h rename to arduino_compat/WProgram.h index 367ff7c..b2c8724 100644 --- a/WProgram.h +++ b/arduino_compat/WProgram.h @@ -6,6 +6,6 @@ * This header is provided to use Z21 Library without source modifications */ -#include "arduinocompat.h" +#include "arduino_compat/arduinocompat.h" #endif // WPROGRAM_H diff --git a/arduinocompat.cpp b/arduino_compat/arduinocompat.cpp similarity index 100% rename from arduinocompat.cpp rename to arduino_compat/arduinocompat.cpp diff --git a/arduinocompat.h b/arduino_compat/arduinocompat.h similarity index 100% rename from arduinocompat.h rename to arduino_compat/arduinocompat.h diff --git a/z21.cpp b/z21library/z21.cpp similarity index 100% rename from z21.cpp rename to z21library/z21.cpp diff --git a/z21.h b/z21library/z21.h similarity index 100% rename from z21.h rename to z21library/z21.h diff --git a/z21header.h b/z21library/z21header.h similarity index 100% rename from z21header.h rename to z21library/z21header.h