-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Minimal CMake
By :

Before we look at adding any CPack commands to our CMakeLists.txt
file, there is one final topic we need to cover that we’ve glossed over so far, and that’s how to ensure that the resource files we load can be found relative to the executable.
Throughout Minimal CMake, we’ve almost exclusively been launching our application from the terminal, but we’ve had to be careful exactly where we launch the application from. Running the application from the app
folder works (e.g., ./build/multi-ninja/Release/minimal-cmake_game-of-life_window
), and changing the directory to the install/bin
folder and launching the application from there also works (this is because we ensure that we copy the shaders to the correct relative location in the install
folder). The problem is that if we try and launch the application from another folder (e.g., our home directory), the shaders will not load.
You will be presented with this...