I am working with a catkin workspace in C++ and when I open it in an IDE, the cmake command gives the following error:
CMake Error at CMakeLists.txt:65 (message): find_package(catkin) failed. catkin was neither found in the workspace nor in the CMAKE_PREFIX_PATH. One reason may be that no ROS setup.sh was sourced before.
However, catkin is installed on my machine as "rospack find catkin" gives the path where catkin is saved which is /opt/ros/noetic/share/catkin.
Moreover, the workspace is sourced with the command "source /opt/ros/noetic/setup.bash"
Appreciate any help!