git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1501
7f0cb862-5218-0410-a997-
914c9d46530a
OPTION(BUILD_SHARED_LIBS "Build FreeGLUT shared library." ON)
OPTION(BUILD_STATIC_LIBS "Build FreeGLUT static library." ON)
+# option for whether warnings and errors should be printed
+OPTION(FREEGLUT_ERRORS "Lib prints errors to stderr" ON)
+#MARK_AS_ADVANCED(FREEGLUT_ERRORS)
+OPTION(FREEGLUT_WARNINGS "Lib prints warnings to stderr" ON)
+#MARK_AS_ADVANCED(FREEGLUT_WARNINGS)
+
# option to also copy .pdb files to install directory when executing
# INSTALL target
IF(MSVC)
#define VERSION_MAJOR @VERSION_MAJOR@
#define VERSION_MINOR @VERSION_MINOR@
#define VERSION_PATCH @VERSION_PATCH@
+
+/* warning and errors printed? */
+#define FREEGLUT_WARNINGS @FREEGLUT_WARNINGS@
+#define FREEGLUT_ERRORS @FREEGLUT_ERRORS@
va_end( ap );
} else {
-
+#if FREEGLUT_ERRORS
va_start( ap, fmt );
fprintf( stderr, "freeglut ");
fprintf( stderr, "\n" );
va_end( ap );
+#endif
if ( fgState.Initialised )
fgDeinitialize ();
va_end( ap );
} else {
-
+#if FREEGLUT_WARNINGS
va_start( ap, fmt );
fprintf( stderr, "freeglut ");
fprintf( stderr, "\n" );
va_end( ap );
+#endif
}
}