소스 검색

Merge branch 'bugfix/hide_component_internal_targets' into 'master'

cmake: hide component internal targets

See merge request espressif/esp-idf!5866
Angus Gratton 6 년 전
부모
커밋
5b9576e282
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      tools/cmake/build.cmake
  2. 1 1
      tools/cmake/component.cmake

+ 1 - 1
tools/cmake/build.cmake

@@ -129,7 +129,7 @@ endfunction()
 #
 function(__build_init idf_path)
     # Create the build target, to which the ESP-IDF build properties, dependencies are attached to
-    add_custom_target(__idf_build_target)
+    add_library(__idf_build_target STATIC IMPORTED)
 
     set_default(python "python")
 

+ 1 - 1
tools/cmake/component.cmake

@@ -173,7 +173,7 @@ function(__component_add component_dir prefix)
     # 'override' components added earlier.
     if(NOT component_target IN_LIST component_targets)
         if(NOT TARGET ${component_target})
-            add_custom_target(${component_target} EXCLUDE_FROM_ALL)
+            add_library(${component_target} STATIC IMPORTED)
         endif()
         idf_build_set_property(__COMPONENT_TARGETS ${component_target} APPEND)
     endif()