@@ -0,0 +1,6 @@
+# The following lines of boilerplate have to be in your project's
+# CMakeLists in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+project(rsource_test)
@@ -0,0 +1,5 @@
+menu "RSOURCE test"
+ config RSOURCE_EXTRA_CONFIG
+ bool "rsource extra config"
+ default y
+endmenu
@@ -0,0 +1,8 @@
+#
+# This is a project Makefile. It is assumed the directory this Makefile resides in is a
+# project subdirectory.
+PROJECT_NAME := rsource_test
+include $(IDF_PATH)/make/project.mk
@@ -0,0 +1 @@
+This project tests that use of rsource in Kconfig files. The main component will source a Kconfig file depending on the target (IDF_TARGET), which in turn will source a Kconfig file in the project directory -- all specified via relative paths.
+idf_component_register(SRCS "test_main.c"
+ INCLUDE_DIRS ".")
+if(NOT CONFIG_RSOURCE_EXTRA_CONFIG)
+ message(FATAL_ERROR "RSOURCE config not included")
+endif()
+rsource "port/$IDF_TARGET/Kconfig"
@@ -0,0 +1,3 @@
+ifndef CONFIG_RSOURCE_EXTRA_CONFIG
+ $(error RSOURCE config not included)
+endif
+rsource "../../../Kconfig.extra"
+void app_main(void)
+{
+}