I'm trying to make a simple sfml/c++ application using cmake.
Suppose I need to refer to a simple foo.png somewhere in my code. I found out that I can only do so if it lies inside of the build folder. This is the folder from where I invoke the cmake .. command and where all of my cmake files (apart from CMakeLists.txt and library modules, such as FindSFML.cmake) reside.
I don't want it to look there... but in a folder that is called art, located in build's parent directory. I want to do this to keep the "build" folder not essential to the project (in the sense that anyone can build the project without relying on stuff that's inside of it).
From what I've seen - looking online, that is - everyone tends to suggest to use the file(COPY ...) command (or something similar) to copy all of the needed assets/resources inside of another folder similar to my before-mentioned build folder (I know there must be a technical term for this... build directory, perhaps?), and profit. But is this copying process really necessary? Shouldn't you be able to just specify a different directory from which to load your assets/resources?
Or maybe I've got it all wrong... cmake is just hard to understand sometimes. Thanks in advance and excuse my lack of technical knowledge.