Is there a Standard(ish) or a way todo this is Visual Studio to dealing with different source files for different compile options?
Right now I have an OpenGL and DirectX framework and I am in the process of merging them together. Currently how I’m differentating them is by included in a #if defined in the source file
// GraphicsGL.hpp
#include <platform.hpp>
#if defined(USE_GL)
// code
#endif
and
// GraphicsDX.cpp
#include <platform.hpp>
#if defined(USE_DX)
// code
#endif
I don’t want to go down the path of two different projects, there is more stuff that isn’t dependent on platform than is.
I would recommend that you factor out the platform dependent code into its own library and you build different versions of it. The actual project would have separate build configurations that would use one or the other.