diff options
author | Robert Bragg <robert@linux.intel.com> | 2011-09-05 22:44:37 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2011-09-09 15:06:31 +0100 |
commit | f1c2d7e965767cfe72829e060295ff47e94df1fa (patch) | |
tree | a1194bd6c0f58730e13798dd4a1e34c48d53ca67 | |
parent | d43505db22e3dcd384e78894c3c3f877363f65f0 (diff) | |
download | cogl-f1c2d7e965767cfe72829e060295ff47e94df1fa.tar.gz |
2.0: Add cogl2-experimental.h + don't pollute .pc CFLAGS
Instead of adding -DCOGL_ENABLE_EXPERIMENTAL_2_0_API to the
cogl-2.0-experimental.pc file we now install a cogl2-experimental.h
that #defines COGL_ENABLE_EXPERIMENTAL_2_0_API before including
cogl.h.
The problem with having the define in the .pc file is that you might
develop a library that depends on the experimental 2.0 api internally
and then you might want to use that library with Clutter which still
uses the 1.0 API but the .pc file for your library will indirectly,
automatically enable the 2.0 api which can cause conflicts.
-rw-r--r-- | cogl/Makefile.am | 1 | ||||
-rw-r--r-- | cogl/cogl-2.0-experimental.pc.in | 2 | ||||
-rw-r--r-- | cogl/cogl2-experimental.h | 31 |
3 files changed, 33 insertions, 1 deletions
diff --git a/cogl/Makefile.am b/cogl/Makefile.am index 91dac5e7..7deca1be 100644 --- a/cogl/Makefile.am +++ b/cogl/Makefile.am @@ -100,6 +100,7 @@ cogl_experimental_h = \ $(srcdir)/cogl-context.h \ $(srcdir)/cogl2-path.h \ $(srcdir)/cogl2-clip-state.h \ + $(srcdir)/cogl2-experimental.h \ $(NULL) # driver sources diff --git a/cogl/cogl-2.0-experimental.pc.in b/cogl/cogl-2.0-experimental.pc.in index a2b4a4bd..93eaf315 100644 --- a/cogl/cogl-2.0-experimental.pc.in +++ b/cogl/cogl-2.0-experimental.pc.in @@ -9,5 +9,5 @@ Name: Cogl Description: An object oriented GL/GLES Abstraction/Utility Layer Version: @COGL_VERSION@ Libs: -L${libdir} -lcogl -Cflags: -I${includedir}/cogl -DCOGL_ENABLE_EXPERIMENTAL_2_0_API +Cflags: -I${includedir}/cogl Requires: ${requires} diff --git a/cogl/cogl2-experimental.h b/cogl/cogl2-experimental.h new file mode 100644 index 00000000..604ba3fe --- /dev/null +++ b/cogl/cogl2-experimental.h @@ -0,0 +1,31 @@ +/* + * Cogl + * + * An object oriented GL/GLES Abstraction/Utility Layer + * + * Copyright (C) 2011 Intel Corporation. + * + * This library is free software; you can redistribute it and/or + + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + * + */ + +#ifndef __COGL2_EXPERIMENTAL_H__ +#define __COGL2_EXPERIMENTAL_H__ + +#define COGL_ENABLE_EXPERIMENTAL_2_0_API +#include <cogl/cogl.h> + +#endif /* __COGL2_EXPERIMENTAL_H__ */ |