Skip to content

Commit 7270c92

Browse files
committed
Merge branch 'bugfix/idf_as_lib_not_in_top_level' into 'master'
CMake: Fix issue when `idf_build_process` is called from a subdirectory Closes IDF-1651 See merge request espressif/esp-idf!8722
2 parents 8b692c8 + ba579d6 commit 7270c92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/cmake/build.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# idf_build_get_property
32
#
43
# @brief Retrieve the value of the specified property related to ESP-IDF build.
@@ -126,8 +125,9 @@ endfunction()
126125
# properties used for the processing phase of the build.
127126
#
128127
function(__build_init idf_path)
129-
# Create the build target, to which the ESP-IDF build properties, dependencies are attached to
130-
add_library(__idf_build_target STATIC IMPORTED)
128+
# Create the build target, to which the ESP-IDF build properties, dependencies are attached to.
129+
# Must be global so as to be accessible from any subdirectory in custom projects.
130+
add_library(__idf_build_target STATIC IMPORTED GLOBAL)
131131

132132
set_default(python "python")
133133

0 commit comments

Comments
 (0)