Closed ISSOtm closed 2 years ago
Note that this blocks #981, since then version.c
gets compiled as C but linked as C++, leading to link errors.
The goal is to "port over" this line from the Makefile, and its equivalents:
https://github.com/gbdev/rgbds/blob/da66eeb40e8184a0306e09757e078c0c34ef0236/Makefile#L112
We pass version.c
directly to the driver so that it always gets recompiled; however, in CMake, we declare it as a normal dependency, so it doesn't get updated:
https://github.com/gbdev/rgbds/blob/da66eeb40e8184a0306e09757e078c0c34ef0236/src/CMakeLists.txt#L12
(I guess the problem is also present in the Makefile if none of a program's source files get updated between two releases...)
src/version.c
is treated as a normal dependency, and not re-built when the executable changes.