aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2024-01-29 23:58:04 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2024-01-30 01:16:18 +0100
commita27a35bd778d9afe9f04e7aed69d950bc4d980e8 (patch)
treecad17cb68da4a210538c15a7fba2289374c4fcc1 /cmake
parentc2e2343054e8d11ebaaf426d6ca105e79e93da6a (diff)
downloadjancity-a27a35bd778d9afe9f04e7aed69d950bc4d980e8.tar.gz
WIP ESP32 port
Diffstat (limited to 'cmake')
-rw-r--r--cmake/esp32.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/cmake/esp32.cmake b/cmake/esp32.cmake
new file mode 100644
index 0000000..0acb240
--- /dev/null
+++ b/cmake/esp32.cmake
@@ -0,0 +1,21 @@
+set(cdroot ${CMAKE_BINARY_DIR})
+
+if(NOT DEFINED ENV{IDF_PATH})
+ message(FATAL_ERROR "Please define environment variable IDF_PATH")
+endif()
+
+include($ENV{IDF_PATH}/tools/cmake/idf.cmake)
+idf_build_process(esp32
+ BUILD_DIR ${CMAKE_BINARY_DIR})
+
+target_link_libraries(${PROJECT_NAME}
+ PRIVATE
+ idf::freertos
+ idf::spi_flash
+ idf::newlib
+)
+
+idf_build_executable(${PROJECT_NAME})
+
+include("${CMAKE_CURRENT_LIST_DIR}/fetch-libfixmath.cmake")
+add_subdirectory(libfixmath)