I have a project which is build using cmake. I am trying to write a shell script for automating the build. But the trouble is, when run from the script the cmake is giving the following error
"include could not find load file:
cmake/comp.cmake "
I tried to run the cmake from the terminal and its working fine. How can i get to run cmake from the shell script??
EDIT: cmake/comp.cmake is a file inside the project folder. which is actually an module i am loading in the cmakelists.txt
EDIT: the script
#!/bin/bash
num=$(grep -c "PATH=$PATH:/opt/robocomp/bin" ~/.bashrc)
if [ $num -eq 0 ]; then
echo "export PATH=$PATH:/opt/robocomp/bin" >> ~/.bashrc;
echo "added /opt/robocomp/bin to PATH ";
fi
source ~/.bashrc
cd ~/robocomp
cmake .
make
sudo make install
if [ $? -eq 0 ]; then
echo "/opt/robocomp/lib/" >> /etc/ld.so.conf
sudo ldconfig
fi