I am trying to bundle together some resources (images, music and data files) into my binary application (written in C++).
I want to have everything contained in a single executable file (so that I could just ship the (large) executable file and it would work, no assets could be deleted).
I see Visual Studio and windows have something called resources files that look like they are designed to do just this.
However, I am interested if there is a cross platform way, or, if there is not, what the Linux equivalent to resource files is (if there is one, provided my any IDE or compiler).
I want to be able to have my entire program contained within one file and so I am not interested in a separate assets or resources directory.
I have found several older answers but find it hard to believe there is not a modern way to do this on Linux.
It seems like the solution is to:
A. Use resource files on Windows
B. Use something that converts the resource into a .c char array and load that on Linux.
Is this really what it takes and if so: what would be the most convenient way to include this process in a cross platform build cycle? Is there some function that CMAKE can run before a program is built?