CMake: Fix issue in newer cmake versions

* Fixes following error:

  can not determine linker language
  for target: __idf_newlib
This commit is contained in:
Jakob Hasse 2020-08-06 13:51:58 +08:00 committed by Fu Hanxi
parent a16d1e8f1a
commit 901925ebc5

View File

@ -475,7 +475,7 @@ function(idf_component_register)
__component_add_include_dirs(${component_lib} "${__INCLUDE_DIRS}" PUBLIC)
__component_add_include_dirs(${component_lib} "${__PRIV_INCLUDE_DIRS}" PRIVATE)
__component_add_include_dirs(${component_lib} "${config_dir}" PUBLIC)
set_target_properties(${component_lib} PROPERTIES OUTPUT_NAME ${COMPONENT_NAME})
set_target_properties(${component_lib} PROPERTIES OUTPUT_NAME ${COMPONENT_NAME} LINKER_LANGUAGE C)
__ldgen_add_component(${component_lib})
else()
add_library(${component_lib} INTERFACE)