[cogl] 2.0: Add cogl2-experimental.h + don't pollute .pc CFLAGS



commit f1c2d7e965767cfe72829e060295ff47e94df1fa
Author: Robert Bragg <robert linux intel com>
Date:   Mon Sep 5 22:44:37 2011 +0100

    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.

 cogl/Makefile.am                 |    1 +
 cogl/cogl-2.0-experimental.pc.in |    2 +-
 cogl/cogl2-experimental.h        |   31 +++++++++++++++++++++++++++++++
 3 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/cogl/Makefile.am b/cogl/Makefile.am
index 91dac5e..7deca1b 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 a2b4a4b..93eaf31 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 0000000..604ba3f
--- /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__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]