CMake error: src directory does not contain a CMakeLists.txt file

Hi, I get an error when compiling my packages it says the src directory does not contain a CMakeLists.txt file, but it does in fact contain one. It cant detect my CMakeLists.txt file

Hi, are you trying to compile my_package?
Make sure you run catkin_make on your catkin_ws folder.

I am running it from that directory but it still wont work

@BrianDlamini,
Since the problem seems to be with your my_package package, did you create it using catkin_create_pkg? If not I suggest you recreate it using that.

Also, there seems to be a misconfiguration in the current CMakeLists.txt file, on the line specified in the error message (or somewhere else), that is causing the system to look for a CMakeLists.txt in the src folder, which is not the normal location (it should be directly inside the package folder, on the same level as src).