is there a method to link specific files so that I can reference them inside my code?
I am developing a project where I’m reading in a video file from within my code and I want to reference it like:
const char* videopath = "myvideo.avi"
CMake usually builds inside a newly created directory so that the relative path is unknown to me. Current workaround is to reference the video file as an absolute path like:
videopath = "/home/NewProggie/Video/myvideo.avi"
I was wondering if there is a better way doing this, using CMake?
Check
CONFIGURE_FILE!In
CMakeLists.txt:In
avi.h.in:The result
avi.h: