This is how I do it (which is pretty much what you're already doing). The only drawback is that you can't conditionally include/exclude .bmx source at compile time, so you need to comment out the Include line. Although it isn't as elegant as a preset compiler directive, it works fine:
Global Debug:Byte = true 'or False Global binPath:string = "" Include "incbinDeclarations.bmx" 'comment this out if running in debug mode. If Debug binPath = "" Else binPath = "Incbin::" EndIf LoadGraphics() Function LoadGraphics() img = LoadImage(binpath+"image.png") End Function