diff --git a/cogl/cogl-macros.h b/cogl/cogl-macros.h index be072c96a..a30cb9044 100644 --- a/cogl/cogl-macros.h +++ b/cogl/cogl-macros.h @@ -35,7 +35,7 @@ * They are only intended for internal use and should not be used by * other projects. */ -#ifdef COGL_DISABLE_DEPRECATION_WARNINGS +#if defined(COGL_DISABLE_DEPRECATION_WARNINGS) || defined(COGL_COMPILATION) #define COGL_DEPRECATED #define COGL_DEPRECATED_FOR(f) diff --git a/cogl/cogl-types.h b/cogl/cogl-types.h index 227b7ec8f..57e0e29db 100644 --- a/cogl/cogl-types.h +++ b/cogl/cogl-types.h @@ -99,7 +99,8 @@ typedef int CoglBool; #define COGL_GNUC_NULL_TERMINATED #endif -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) && \ + !defined (COGL_COMPILATION) #define COGL_GNUC_DEPRECATED \ __attribute__((__deprecated__)) #else