CMAKE INSTALL DIRECTORY FULL
Making it even more difficult is that an environment variable needs to be set (essentially to the full path of install) because configure is a shell script. The script has to be run from the install/plots directory because that’s where the symlinks need to be. It’s that second step I’m having trouble with.
CMAKE INSTALL DIRECTORY INSTALL
The first step we are doing with the usual: install ( CMAKEINSTALLPREFIX refers to installation prefix during the install step. Even when CMAKEINSTALLPREFIX is manually set, the key refers to the build directory.
CMAKE INSTALL DIRECTORY HOW TO
But, with some ugly GNU Make, I was able to figure out how to run that script at make install time so the symlinks got created. Of course, this meant only the user that built the experiment could run this because of directory permissions. What we did in old GNU Make days is during a model run when it’s time to make plots, the user ran a script in our (simplified for here) src/plots/ directory, src/plots/configure which set up a bunch of symlinks in the source tree so the plotting package was happy. but there are postprocessing steps I often miss. I was mainly focusing on running the model, etc. I was looking for a build-time command/script that would copy dependencies to the build output directory so when I run a target the necessary dependency is there along with the executable. Most of this is working, but I’m getting stuck on a new wrinkle. Looking at that it looks to be used along with install which is then used with a separate install comment to install it to the system. What I mean is that userA can build/install the model, and then userB can go to userA’s installation and run an experiment with that install.
![cmake install directory cmake install directory](https://www.evl.uic.edu/aspale/writing/immersaview-documentation/ccmake-qavatar.jpg)
Enter 'CMakeLists.txt' as the filename and click OK. However, when configuring the build script, paths to your native source files and libraries are relative to the location of the build script. Note: You can create the build script in any location you want. To wit, I work on a earth science model and one of the goals with our recent conversion to CMake is to make things “user portable” for the users. Right-click on the root directory of your-module and select New > File.
![cmake install directory cmake install directory](https://res.cloudinary.com/canonical/image/fetch/f_auto,q_auto,fl_sanitize,w_792,h_762/https://dashboard.snapcraft.io/site_media/appmedia/2019/06/cmake-gui-devtoolset-8.png)
This is a little convoluted and long, but I’m hoping it’s possible in CMake…with as little change to source code as possible!