[Error] No project() command is present. ,Please create a target named 'app' (ex: add_executable(app)) before adding this file

Hi.

I’m trying to run FOMO detections in ESP-EYE by using C++ library.
But, It doesn’t work.

=====================

OS : Windows10
Env : ESP-IDF4.4

=====================

I followed all the steps on this site : “On your Espressif ESP-EYE (ESP32) development board - Edge Impulse Documentation” but I couldn’t build the file.

When I use a command “idf.py build”, I can see 2 errors.

===========================================================

Executing action: all (aliases: build)
Running cmake in directory c:\users\kmmjj\desktop\esp-idf-2\bee1\build
Executing “cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=1 c:\users\kmmjj\desktop\esp-idf-2\bee1”…
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as

project(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a “project(Project)” command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.

– The C compiler identification is GNU 6.3.0
– The CXX compiler identification is GNU 6.3.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: C:/MinGW/bin/gcc.exe - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: C:/MinGW/bin/c++.exe - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
CMake Error at CMakeLists.txt:4 (message):
Please create a target named ‘app’ (ex: add_executable(app)) before adding
this file

– Configuring incomplete, errors occurred!
See also “C:/Users/kmmjj/Desktop/esp-idf-2/bee1/build/CMakeFiles/CMakeOutput.log”.
cmake failed with exit code 1

===========================================================

  1. No project() command is present. The top-level CMakeLists.txt file must
    contain a literal, direct call to the project() command. Add a line of
    code such asproject(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a “project(Project)” command on the first
line.

=> This error can be fixed by adding “project(esp-idf C CXX ASM)” at line 2 of CMakeLists.txt

  1. CMake Error at CMakeLists.txt:4 (message):
    Please create a target named ‘app’ (ex: add_executable(app)) before adding
    this file

=> But I could not fix this error.

Are there any good ideas to solve this problem?

Hello @judgement ,

Could you try using a Linux VM by any chance, none of us have been using esp-idf with Windows.

Or if anyone from the community here can help, I’m sure @judgement is not the only one interested :wink: .

Regards,

Louis

1 Like

Hmmmm, where are you executing the idf.py build command from?
c:\users\kmmjj\desktop\esp-idf-2\bee1\build does not look like the right path…

1 Like

I’ve noticed that you also created an issue on Github - in future, please refrain from cross-posting. We will continue discussion on Github.

1 Like

Thank you very much!!
I’ll try using a WSL system.
If the problem is solved, I will post again.

I’m really sorry. Next, I will write a question post on Github.
I’ll check the path and try again.