From 8ec7f3a36d01bfc04c8e395ba159814a7e53504f Mon Sep 17 00:00:00 2001 From: Taras Zaporozhets Date: Thu, 13 Apr 2023 19:03:31 +0200 Subject: [PATCH] Add linux build support --- CMakeLists.txt | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8648f89..4b44a03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,22 @@ -idf_component_register(INCLUDE_DIRS include) +if(DEFINED IDF_TARGET) + idf_component_register(INCLUDE_DIRS include) + target_compile_definitions(${COMPONENT_TARGET} INTERFACE HAS_UNCAUGHT_EXCEPTIONS=1) +else() + add_library(date + include/date/chrono_io.h + include/date/date.h + include/date/ios.h + include/date/islamic.h + include/date/iso_week.h + include/date/julian.h + include/date/ptz.h + include/date/solar_hijri.h + include/date/tz.h + include/date/tz_private.h + src/tz.cpp + ) -target_compile_definitions(${COMPONENT_TARGET} INTERFACE HAS_UNCAUGHT_EXCEPTIONS=1) + target_include_directories(date PUBLIC + include/ + ) +endif()