I have a very simple C++ executable and a few .txt
resource files. At build time I embedd the .txt
files into the C++ binary via linker and then I load them at runtime (based on this answer). That works great.
My problem is relinking. Whenewer I change the .cpp
source of my executable and run make
, the project rebuilds itself. However, if I change a .txt
file and run make
, the binary doesn't relink. How can I force CMake to watch changes to my resource files (.txt
) so that when those change the executable gets relinked to contain the newest .txt
resource files?