diff options
| author | Alexander von Gluck IV <kallisti5@unixzen.com> | 2012-11-13 16:52:06 (GMT) |
|---|---|---|
| committer | Alexander von Gluck IV <kallisti5@unixzen.com> | 2012-11-13 16:52:06 (GMT) |
| commit | fb7f48a9eb354097fdf34a456d47bc6e4fe5f7db (patch) | |
| tree | c7b416b925edeb47a7ff5a4e429289399c4bee9c | |
| parent | 344b3218d40b44df5bfc8c7c4859e7d9ed4d06f2 (diff) | |
OpenGL Kit: Use GLU-9.0 for gcc2 and gcc4hrev44831
* As of Mesa3D 9.0+, GLU is a seperate project
* Our in-tree GLUT builds with GLU-9.0 without
modification.
* We ignore the GLU libraries that Mesa-7.8.2 and
Mesa-8.1-devel provide and use the glu-9.0 ones
* This is kind of a limbo state, but works for now.
* Eventually we will be on Mesa 9.0 (which requires
the external GLU) and Mesa 7.8.2 (which works with
the newer external GLU) and will rip GLU out of the
7.8.2 OptionalBuildPackage.
* I don't *think* we are using the Mesa GLU headers...
we will know for sure when I pull'em out of the
OptionalBuildPackages :D
| -rw-r--r-- | build/jam/OptionalBuildFeatures | 27 | ||||
| -rw-r--r-- | src/kits/opengl/Jamfile | 5 | ||||
| -rw-r--r-- | src/libs/glut/Jamfile | 3 |
3 files changed, 34 insertions, 1 deletions
diff --git a/build/jam/OptionalBuildFeatures b/build/jam/OptionalBuildFeatures index 3122784..ca0097a 100644 --- a/build/jam/OptionalBuildFeatures +++ b/build/jam/OptionalBuildFeatures @@ -180,6 +180,29 @@ if $(HAIKU_BUILD_FEATURE_CLUCENE) { } +# GLU (GL Utilities) +if $(TARGET_ARCH) = x86 { + if $(HAIKU_GCC_VERSION[1]) >= 4 { + HAIKU_GLU_FILE = glu-9.0-x86-gcc4-2012-11-13.zip ; + } else { + HAIKU_GLU_FILE = glu-9.0-x86-gcc2-2012-11-13.zip ; + } + + local zipFile = [ DownloadFile $(HAIKU_GLU_FILE) + : $(baseURL)/lib/$(HAIKU_GLU_FILE) ] ; + + HAIKU_GLU_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR) + $(HAIKU_GLU_FILE:B) ] ; + HAIKU_GLU_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_GLU_DIR) + : develop/headers/os/opengl/GL : $(zipFile) : extracted-glu-headers ] ; + HAIKU_GLU_LIBS = [ ExtractArchive $(HAIKU_GLU_DIR) + : system/lib/libGLU.a : $(zipFile) : extracted-glu ] ; + HAIKU_GLU_HEADERS = [ FDirName $(HAIKU_GLU_DIR) develop headers os opengl ] ; +} else { + Echo "GLU not yet available on $(TARGET_ARCH)" ; +} + + # Mesa if $(TARGET_ARCH) = x86 { local glslObject ; @@ -205,7 +228,6 @@ if $(TARGET_ARCH) = x86 { HAIKU_MESA_LIBS = [ ExtractArchive $(HAIKU_MESA_DIR) : - lib.haiku/libglu.a $(galliumObjects) lib.haiku/libglapi.a $(glslObject) @@ -215,6 +237,9 @@ if $(TARGET_ARCH) = x86 { HAIKU_MESA_HEADERS = [ FDirName $(HAIKU_MESA_DIR) include ] ; + Depends $(HAIKU_MESA_HEADERS_DEPENDENCY) : $(HAIKU_GLU_HEADERS_DEPENDENCY) ; + Depends $(HAIKU_MESA_LIBS) : $(HAIKU_GLU_LIBS) ; + } else { Echo "Mesa 3D rendering support not available on $(TARGET_ARCH)" ; } diff --git a/src/kits/opengl/Jamfile b/src/kits/opengl/Jamfile index ca1347d..009ff9f 100644 --- a/src/kits/opengl/Jamfile +++ b/src/kits/opengl/Jamfile @@ -19,7 +19,9 @@ if $(TARGET_PLATFORM) != haiku { } +SubDirSysHdrs $(HAIKU_GLU_HEADERS) ; SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; +Includes [ FGristFiles $(sources) ] : $(HAIKU_GLU_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; UseHeaders [ FDirName $(HAIKU_MESA_DIR) include ] ; @@ -41,6 +43,9 @@ if $(HAIKU_GCC_VERSION[1]) < 3 { SharedLibrary libGL.so : $(sources) : + # GLU + $(HAIKU_GLU_LIBS) + # Glut <opengl>glut.o diff --git a/src/libs/glut/Jamfile b/src/libs/glut/Jamfile index 62a2755..cb380e8 100644 --- a/src/libs/glut/Jamfile +++ b/src/libs/glut/Jamfile @@ -55,6 +55,9 @@ if $(HAIKU_GCC_VERSION[1]) < 3 { } +# Ensure GLU dependency is met +Includes [ FGristFiles $(sourcesCc) $(sourcesCpp) ] + : $(HAIKU_GLU_HEADERS_DEPENDENCY) ; # Ensure Mesa dependency is met Includes [ FGristFiles $(sourcesCc) $(sourcesCpp) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; |
