Reputation: 1
I am new to the CMake environment and I am trying to learn it for OpenSceneGraph. I am following the instructions from the book "OpenSceneGraph 3.0 Beginners Guide". I am getting an error when I try to create the "Hello World" project in Chapter 3.
When I drag the CMakeLists.txt to the cmake-gui, I always get an error;
CMake Error at CMakeLists.txt:12 (add_executable):
Cannot find source file:
main.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
.hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc
CMake Error at CMakeLists.txt:12 (add_executable):
No SOURCES given to target: MyProject
According to the error I am getting, I need to specify the locations of the Sources but I could not get in which stage I need to do that.
I am struggling with the basics, and I need to learn these two programs for my thesis. I know the beginnings are hard to adjust, but I did not understand where I did a mistake. If anyone has faced the same problem, could you please help me?
Thank you for your help in advance.
P.S. I could provide more information regarding your answers, or questions.
Upvotes: 0
Views: 2421