tileson
tileson copied to clipboard
Proposal to Standardize Resource Path Handling in CMakeLists
When setting up this repository for the first-time build, the developer currently needs to modify the CMake build directory because the executable’s working directory must be set relative to the content directory for assets to load properly.
To streamline this process and simplify project setup, I propose adding an interface library to the top-level CMakeLists.txt file. This interface library will propagate a RESOURCE_PATH definition with the value ${PROJECT_SOURCE_DIR}/content/ to all child targets, eliminating the need for manual adjustments.
Additionally, update all the code that loads assets to use the new RESOURCE_PATH, for example: fs::path(RESOURCE_PATH) / filepath.