When I run "idf.py build", cmake gives an error. Build cannot be completed at this time.
% idf.py build
~~~
~~~
CMake Error at CMakeLists.txt:16 (target_link_libraries):
The keyword signature for target_link_libraries has already been used with
the target "main.elf". All uses of target_link_libraries with a target
must be either all-keyword or all-plain.
The uses of the keyword signature are here:
* /opt/esp-idf-v5.0.5/tools/cmake/project.cmake:608 (target_link_libraries)
* /opt/esp-idf-v5.0.5/tools/cmake/project.cmake:617 (target_link_libraries)
-- Configuring incomplete, errors occurred!
make: *** [Makefile:1670: cmake_check_build_system] エラー 1
HINT: Projects using target_link_libraries with project_elf explicitly and custom CMake projects must specify PRIVATE, PUBLIC or INTERFACE arguments.
make failed with exit code 2, output of the command is in the /home/user/Desktop/esp-idf/ncnn_on_esp32/build/log/idf_py_stderr_output_61322 and /home/user/Desktop/esp-idf/ncnn_on_esp32/build/log/idf_py_stdout_output_61322
Environment
Operating System: Ubuntu22.04
esp-idf:v5.0.5
Solution
Add private to CMakeLists.txt:16 according to the error statement of idf.py build
Problem Description
When I run "idf.py build", cmake gives an error. Build cannot be completed at this time.
Environment
Solution
Add private to CMakeLists.txt:16 according to the error statement of idf.py build
The problem was resolved by the above fix. I've posted it here so others don't have trouble.