Avoid mesa_headers on X11, also link with -lGL only where necesssary
The GLEW headers are enough, and what we actually use in these places. In addition to handling GL extension things in its dynamic fashion, GLEW headers also have declarations for standard, non-extension, OpenGL API, including xgl and wgl ones. Most likely we don't need mesa_headers on Windows or OS X either, and can drop them completely. Change-Id: Ic0d8d6238c862f8fe4a74e99e95344dcbf540980
This commit is contained in:
parent
318c3a48c6
commit
b216cc1b80
@ -26,7 +26,7 @@ $(eval $(call gb_Library_add_defs,avmedia,\
|
||||
$(eval $(call gb_Library_use_externals,avmedia,\
|
||||
boost_headers \
|
||||
glew \
|
||||
mesa_headers \
|
||||
$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_use_libraries,avmedia,\
|
||||
|
@ -18,7 +18,7 @@ $(eval $(call gb_Library_use_externals,avmediaogl, \
|
||||
libgltf \
|
||||
glew \
|
||||
glm_headers \
|
||||
mesa_headers \
|
||||
$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_use_libraries,avmediaogl,\
|
||||
|
@ -43,7 +43,7 @@ $(eval $(call gb_Library_add_exception_objects,oglcanvas,\
|
||||
$(eval $(call gb_Library_use_externals,oglcanvas,\
|
||||
boost_headers \
|
||||
glew \
|
||||
mesa_headers \
|
||||
$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
|
||||
))
|
||||
|
||||
ifeq ($(strip $(OS)),MACOSX)
|
||||
|
@ -29,7 +29,7 @@ $(eval $(call gb_Library_use_externals,chartcore,\
|
||||
boost_headers \
|
||||
glm_headers \
|
||||
glew \
|
||||
mesa_headers \
|
||||
$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_use_custom_headers,chartcore,\
|
||||
|
@ -22,7 +22,7 @@ $(eval $(call gb_Library_set_precompiled_header,chartopengl,$(SRCDIR)/chart2/inc
|
||||
$(eval $(call gb_Library_use_externals,chartopengl,\
|
||||
boost_headers \
|
||||
glm_headers \
|
||||
mesa_headers \
|
||||
$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
|
||||
glew \
|
||||
))
|
||||
|
||||
|
36
configure.ac
36
configure.ac
@ -10410,23 +10410,25 @@ else
|
||||
fi
|
||||
ENABLE_OPENGL_CANVAS=TRUE
|
||||
|
||||
dnl ===================================================================
|
||||
dnl Check for system Mesa
|
||||
dnl ===================================================================
|
||||
AC_MSG_CHECKING([which Mesa headers to use])
|
||||
if test "$with_system_mesa_headers" = "yes"; then
|
||||
AC_MSG_RESULT([external])
|
||||
SYSTEM_MESA_HEADERS=TRUE
|
||||
AC_LANG_PUSH(C)
|
||||
AC_CHECK_HEADER(GL/glxext.h, [],
|
||||
[ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>])
|
||||
AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC])
|
||||
AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no))
|
||||
AC_LANG_POP(C)
|
||||
else
|
||||
AC_MSG_RESULT([internal])
|
||||
SYSTEM_MESA_HEADERS=
|
||||
BUILD_TYPE="$BUILD_TYPE MESA"
|
||||
if test "$USING_X11" != TRUE; then
|
||||
dnl ===================================================================
|
||||
dnl Check for system Mesa
|
||||
dnl ===================================================================
|
||||
AC_MSG_CHECKING([which Mesa headers to use])
|
||||
if test "$with_system_mesa_headers" = "yes"; then
|
||||
AC_MSG_RESULT([external])
|
||||
SYSTEM_MESA_HEADERS=TRUE
|
||||
AC_LANG_PUSH(C)
|
||||
AC_CHECK_HEADER(GL/glxext.h, [],
|
||||
[ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>])
|
||||
AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC])
|
||||
AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no))
|
||||
AC_LANG_POP(C)
|
||||
else
|
||||
AC_MSG_RESULT([internal])
|
||||
SYSTEM_MESA_HEADERS=
|
||||
BUILD_TYPE="$BUILD_TYPE MESA"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -112,7 +112,6 @@ $(eval $(call gb_Library_use_static_libraries,sofficeapp,\
|
||||
$(eval $(call gb_Library_add_libs,sofficeapp,\
|
||||
-lm $(DLOPEN_LIBS) \
|
||||
-lpthread \
|
||||
-lGL \
|
||||
-lX11 \
|
||||
))
|
||||
endif
|
||||
|
2
external/libgltf/ExternalProject_libgltf.mk
vendored
2
external/libgltf/ExternalProject_libgltf.mk
vendored
@ -67,7 +67,7 @@ $(call gb_ExternalProject_get_state_target,libgltf,build) :
|
||||
$(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
|
||||
--disable-werror \
|
||||
BOOST_CFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost))" \
|
||||
GLEW_CFLAGS="$(if $(SYSTEM_GLEW),$(GLEW_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glew)/include)" \
|
||||
GLEW_CFLAGS="$(if $(SYSTEM_GLEW),$(GLEW_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glew)/include) -DGLEW_NO_GLU" \
|
||||
GLM_CFLAGS="$(if $(SYSTEM_GLM),$(GLM_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glm))" \
|
||||
$(if $(libgltf_CPPFLAGS),CPPFLAGS='$(libgltf_CPPFLAGS)') \
|
||||
&& $(MAKE) \
|
||||
|
@ -31,7 +31,7 @@ $(eval $(call gb_Library_use_libraries,OGLTrans,\
|
||||
$(eval $(call gb_Library_use_externals,OGLTrans,\
|
||||
boost_headers \
|
||||
glew \
|
||||
mesa_headers \
|
||||
$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
|
||||
glm_headers \
|
||||
))
|
||||
|
||||
|
@ -29,7 +29,7 @@ $(eval $(call gb_Library_set_precompiled_header,slideshow,$(SRCDIR)/slideshow/in
|
||||
$(eval $(call gb_Library_use_externals,slideshow,\
|
||||
boost_headers \
|
||||
glew \
|
||||
mesa_headers \
|
||||
$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_use_sdk_api,slideshow))
|
||||
|
@ -71,7 +71,6 @@ ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
|
||||
$(eval $(call gb_Executable_add_libs,gengal,\
|
||||
$(DLOPEN_LIBS) \
|
||||
-lpthread \
|
||||
-lGL \
|
||||
-lX11 \
|
||||
))
|
||||
|
||||
|
@ -84,7 +84,7 @@ $(eval $(call gb_Library_use_externals,svxcore,\
|
||||
boost_headers \
|
||||
icuuc \
|
||||
icu_headers \
|
||||
mesa_headers \
|
||||
$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
|
||||
glew \
|
||||
libxml2 \
|
||||
))
|
||||
|
@ -18,7 +18,7 @@ $(eval $(call gb_CppunitTest_use_externals,vcl_bitmap_test,\
|
||||
boost_headers \
|
||||
glew \
|
||||
glm_headers \
|
||||
mesa_headers \
|
||||
$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_set_include,vcl_bitmap_test,\
|
||||
|
@ -13,7 +13,7 @@ $(eval $(call gb_Executable_use_externals,icontest,\
|
||||
boost_headers \
|
||||
glew \
|
||||
glm_headers \
|
||||
mesa_headers \
|
||||
$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Executable_use_api,icontest,\
|
||||
@ -29,7 +29,6 @@ ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
|
||||
$(eval $(call gb_Executable_add_libs,icontest,\
|
||||
-lm $(DLOPEN_LIBS) \
|
||||
-lpthread \
|
||||
-lGL \
|
||||
-lX11 \
|
||||
))
|
||||
|
||||
|
@ -44,7 +44,6 @@ ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
|
||||
$(eval $(call gb_Executable_add_libs,mtfdemo,\
|
||||
-lm $(DLOPEN_LIBS) \
|
||||
-lpthread \
|
||||
-lGL \
|
||||
-lX11 \
|
||||
))
|
||||
|
||||
|
@ -38,7 +38,6 @@ ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
|
||||
$(eval $(call gb_Executable_add_libs,ui-previewer,\
|
||||
-lm $(DLOPEN_LIBS) \
|
||||
-lpthread \
|
||||
-lGL \
|
||||
-lX11 \
|
||||
))
|
||||
|
||||
|
@ -19,7 +19,7 @@ $(eval $(call gb_Executable_use_externals,vcldemo,\
|
||||
boost_headers \
|
||||
glew \
|
||||
glm_headers \
|
||||
mesa_headers \
|
||||
$(if $(filter WNT MACOSX,$(OS)),mesa_headers) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Executable_set_include,vcldemo,\
|
||||
@ -50,7 +50,6 @@ ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
|
||||
$(eval $(call gb_Executable_add_libs,vcldemo,\
|
||||
-lm $(DLOPEN_LIBS) \
|
||||
-lpthread \
|
||||
-lGL \
|
||||
-lX11 \
|
||||
))
|
||||
|
||||
|
@ -33,7 +33,6 @@ $(eval $(call gb_StaticLibrary_add_libs,glxtest,\
|
||||
-lm \
|
||||
-ldl \
|
||||
-lpthread \
|
||||
-lGL \
|
||||
-lX11 \
|
||||
))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user