aboutsummaryrefslogtreecommitdiff
path: root/targets/baremetal-sdk/esp-idf/CMakeLists.txt.example
diff options
context:
space:
mode:
authorRoland Takacs <1487864+rtakacs@users.noreply.github.com>2021-12-06 11:02:52 +0100
committerGitHub <noreply@github.com>2021-12-06 11:02:52 +0100
commitaf297bc5784ad702a4b149fdf996401576751378 (patch)
tree73fdb6c590447b622da7dcd1d1ed06f6197c6314 /targets/baremetal-sdk/esp-idf/CMakeLists.txt.example
parent9860d66a56ed44f62e1dafb9900e6f2c886a56d3 (diff)
Separate targets into os and baremetal-sdk parts (#4842)
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs roland.takacs@h-lab.eu
Diffstat (limited to 'targets/baremetal-sdk/esp-idf/CMakeLists.txt.example')
-rw-r--r--targets/baremetal-sdk/esp-idf/CMakeLists.txt.example16
1 files changed, 16 insertions, 0 deletions
diff --git a/targets/baremetal-sdk/esp-idf/CMakeLists.txt.example b/targets/baremetal-sdk/esp-idf/CMakeLists.txt.example
new file mode 100644
index 00000000..e7e9d7c0
--- /dev/null
+++ b/targets/baremetal-sdk/esp-idf/CMakeLists.txt.example
@@ -0,0 +1,16 @@
+# assumes there is a component with this the following
+# - set the JERRY_DIR wherever the jerryscript source code (the include files) is
+# - a "lib" directory with the 2 libraries below
+
+set(JERRY_DIR ${PROJECT_DIR}/../../../jerryscript/)
+
+idf_component_register(
+ SRC_DIRS ${JERRY_DIR}/targets/baremetal-sdk/esp-idf
+ INCLUDE_DIRS ${JERRY_DIR}/jerry-core/include ${JERRY_DIR}/jerry-ext/include
+)
+
+add_prebuilt_library(libjerry-core lib/libjerry-core.a REQUIRES newlib PRIV_REQUIRES ${COMPONENT_NAME})
+add_prebuilt_library(libjerry-ext lib/libjerry-ext.a PRIV_REQUIRES ${COMPONENT_NAME})
+
+target_link_libraries(${COMPONENT_LIB} INTERFACE libjerry-core)
+target_link_libraries(${COMPONENT_LIB} INTERFACE libjerry-ext)