fix cmake files to not build gl in demo files when not requested