I copied the downloaded gmt gshhg and dcw files in to /opt/ and uncompressed them, configured the cmake files, and created the build folder at /opt/gmt-6.3.0/build/. The installation seemed to go through well.
Here is the problem. I have no idea where my GMT is installed. gmt --version will give me an error saying gmt is not installed. So what would be the path I need to add to my .bashrc? Is there a command that will enable me to find the path?
I’m able to find the info from a install_manifest.txt file. It turns out to be the below. Note the double quotation
/opt/gmt-6.3.0/build/“/opt/gmt-6.3.0”/bin/
I thought that cmake link was supposed to be the link to the gmt installation file, without realizing it should be the destination file.
BTW, where is the best location for the "build" folder, considering that my desired destination location for gmt is /usr/local/ (default) and my downloaded and uncompressed sourced files for gmt, gshhg, and dcw are all located at /opt/?
The instruction says this:
“To keep generated files separate from source files in the source tree, you should create a build directory in the top-level directory.”
I tried to create the “build” directory under /opt/, but got the below error: CMake Error: The source directory "/opt" does not appear to contain CMakeLists.txt.
Does that mean I would have to create the “build” file at /opt/gmt-6.3.0?
If you want to install the GMT binaries and libraries in /opt/gmt-6.3.0/lib,include,bin.share etc then I would use /opt/gmt-6.3.0 as the prefix in the configure but where you do the configuration and build can be anywhere - it can be deleted when you are done anyway. SO I would do that in my home dir. I dont think you want the build dir and the prefix install dir to be the same.