See https://github.com/colobot/colobot/issues/1306#issuecomment-657096265
.h file shouldn't be listed as source to add_library(... INTERFACE)
Moved most of the variables to targets in the main src. Made libraries in repo export targets. Refactor STATIC flags a little and add more. This commit definitely breaks a lot of things like tests but the main game builds at least with MSVC.