From: Vadim Zeitlin Date: Sun, 31 May 2009 09:12:20 +0000 (+0000) Subject: allow overriding wxUSE_GLCANVAS value in setup.h by using USE_OPENGL=1 with make... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/24f618eea6df32387bf7d11abacdd4fd8b29b86a allow overriding wxUSE_GLCANVAS value in setup.h by using USE_OPENGL=1 with make (closes #10832) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/build/bakefiles/opengl.bkl b/build/bakefiles/opengl.bkl index e258b812ec..c22a2123f1 100644 --- a/build/bakefiles/opengl.bkl +++ b/build/bakefiles/opengl.bkl @@ -2,26 +2,43 @@ - + - + $(mk.evalExpr(wxwin.mkLibName('core'))) $(mk.evalExpr(wxwin.mkLibName('base'))) - + + + + + + + + wxUSE_GLCANVAS=1 + + + WXUSINGDLL WXMAKINGDLL_GL + $(OPENGL_DEFINE) $(OPENGL_SRC) $(OPENGL_HDR) - + $(WXLIBGLDEP_CORE) $(WXLIBGLDEP_BASE) basedll @@ -32,9 +49,10 @@ $(EXTRALIBS_OPENGL) - + + $(OPENGL_DEFINE) $(OPENGL_SRC) $(OPENGL_HDR) diff --git a/build/msw/makefile.bcc b/build/msw/makefile.bcc index a71f80d0c6..888d6e14bd 100644 --- a/build/msw/makefile.bcc +++ b/build/msw/makefile.bcc @@ -1337,8 +1337,8 @@ GLDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I..\..\include -DWXBUILDING \ -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ - -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_GL -Hu \ - -H=$(OBJS)\wxprec_gldll.csm $(CPPFLAGS) $(CXXFLAGS) + -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_GL \ + $(__OPENGL_DEFINE_p) -Hu -H=$(OBJS)\wxprec_gldll.csm $(CPPFLAGS) $(CXXFLAGS) GLDLL_OBJECTS = \ $(OBJS)\gldll_dummy.obj \ $(OBJS)\gldll_glcmn.obj \ @@ -1349,8 +1349,8 @@ GLLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I..\..\include -DWXBUILDING \ -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ - -I..\..\src\regex -I..\..\src\expat\lib -Hu -H=$(OBJS)\wxprec_gllib.csm \ - $(CPPFLAGS) $(CXXFLAGS) + -I..\..\src\regex -I..\..\src\expat\lib $(__OPENGL_DEFINE_p) -Hu \ + -H=$(OBJS)\wxprec_gllib.csm $(CPPFLAGS) $(CXXFLAGS) GLLIB_OBJECTS = \ $(OBJS)\gllib_dummy.obj \ $(OBJS)\gllib_glcmn.obj \ @@ -4072,6 +4072,9 @@ ____wxstc_namelib_DEP = $(__stclib___depname) __gldll___depname = \ $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_bcc$(VENDORTAG).dll !endif +!if "$(USE_OPENGL)" == "1" +__OPENGL_DEFINE_p_1 = -dwxUSE_GLCANVAS=1 +!endif !if "$(MONOLITHIC)" == "0" __WXLIBGLDEP_CORE_p = \ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib @@ -4221,6 +4224,9 @@ __MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1 !if "$(USE_GDIPLUS)" == "1" __GFXCTX_DEFINE_p = -DwxUSE_GRAPHICS_CONTEXT=1 !endif +!if "$(USE_OPENGL)" == "1" +__OPENGL_DEFINE_p = -DwxUSE_GLCANVAS=1 +!endif !if "$(WXUNIV)" == "0" __SETUP_H_SUBDIR_FILENAMES = msw !endif @@ -14360,7 +14366,7 @@ $(OBJS)\gldll_dummy.obj: ..\..\src\common\dummy.cpp $(CXX) -q -c -P -o$@ $(GLDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp $(OBJS)\gldll_version.res: ..\..\src\msw\version.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_58) $(__DEBUG_DEFINE_p_57) $(__EXCEPTIONS_DEFINE_p_57) $(__RTTI_DEFINE_p_57) $(__THREAD_DEFINE_p_57) $(__UNICODE_DEFINE_p_58) $(__MSLU_DEFINE_p_57) $(__GFXCTX_DEFINE_p_57) -i$(SETUPHDIR) -i..\..\include -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_bcc$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_GL ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_58) $(__DEBUG_DEFINE_p_57) $(__EXCEPTIONS_DEFINE_p_57) $(__RTTI_DEFINE_p_57) $(__THREAD_DEFINE_p_57) $(__UNICODE_DEFINE_p_58) $(__MSLU_DEFINE_p_57) $(__GFXCTX_DEFINE_p_57) -i$(SETUPHDIR) -i..\..\include -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_bcc$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_GL $(__OPENGL_DEFINE_p_1) ..\..\src\msw\version.rc $(OBJS)\gldll_glcmn.obj: ..\..\src\common\glcmn.cpp $(CXX) -q -c -P -o$@ $(GLDLL_CXXFLAGS) ..\..\src\common\glcmn.cpp diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc index 9f5fafa4fc..8407969098 100644 --- a/build/msw/makefile.gcc +++ b/build/msw/makefile.gcc @@ -1346,8 +1346,9 @@ GLDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) $(__GFXCTX_DEFINE_p) \ -I$(SETUPHDIR) -I..\..\include -W -Wall -DWXBUILDING -I..\..\src\tiff\libtiff \ -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ - -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_GL $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) + -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_GL $(__OPENGL_DEFINE_p) \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) \ + $(CXXFLAGS) GLDLL_OBJECTS = \ $(OBJS)\gldll_dummy.o \ $(OBJS)\gldll_version_rc.o \ @@ -1359,8 +1360,8 @@ GLLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) $(__GFXCTX_DEFINE_p) \ -I$(SETUPHDIR) -I..\..\include -W -Wall -DWXBUILDING -I..\..\src\tiff\libtiff \ -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ - -I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ - -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) + -I..\..\src\expat\lib $(__OPENGL_DEFINE_p) $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) GLLIB_OBJECTS = \ $(OBJS)\gllib_dummy.o \ $(OBJS)\gllib_glcmn.o \ @@ -4215,6 +4216,9 @@ __gldll___depname = \ endif endif endif +ifeq ($(USE_OPENGL),1) +__OPENGL_DEFINE_p_1 = --define wxUSE_GLCANVAS=1 +endif ifeq ($(MONOLITHIC),0) __WXLIBGLDEP_CORE_p = \ -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core @@ -4382,6 +4386,9 @@ endif ifeq ($(USE_GDIPLUS),1) __GFXCTX_DEFINE_p = -DwxUSE_GRAPHICS_CONTEXT=1 endif +ifeq ($(USE_OPENGL),1) +__OPENGL_DEFINE_p = -DwxUSE_GLCANVAS=1 +endif ifeq ($(WXUNIV),0) __SETUP_H_SUBDIR_FILENAMES = msw endif @@ -14960,7 +14967,7 @@ $(OBJS)\gldll_dummy.o: ../../src/common/dummy.cpp $(CXX) -c -o $@ $(GLDLL_CXXFLAGS) $(CPPDEPS) $< $(OBJS)\gldll_version_rc.o: ../../src/msw/version.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_58) $(__DEBUG_DEFINE_p_57) $(__EXCEPTIONS_DEFINE_p_57) $(__RTTI_DEFINE_p_57) $(__THREAD_DEFINE_p_57) $(__UNICODE_DEFINE_p_58) $(__MSLU_DEFINE_p_57) $(__GFXCTX_DEFINE_p_57) --include-dir $(SETUPHDIR) --include-dir ../../include --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_gcc$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_GL + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_58) $(__DEBUG_DEFINE_p_57) $(__EXCEPTIONS_DEFINE_p_57) $(__RTTI_DEFINE_p_57) $(__THREAD_DEFINE_p_57) $(__UNICODE_DEFINE_p_58) $(__MSLU_DEFINE_p_57) $(__GFXCTX_DEFINE_p_57) --include-dir $(SETUPHDIR) --include-dir ../../include --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_gcc$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_GL $(__OPENGL_DEFINE_p_1) $(OBJS)\gldll_glcmn.o: ../../src/common/glcmn.cpp $(CXX) -c -o $@ $(GLDLL_CXXFLAGS) $(CPPDEPS) $< diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc index ea99b8f4ad..491da92e84 100644 --- a/build/msw/makefile.vc +++ b/build/msw/makefile.vc @@ -14706,7 +14706,7 @@ $(OBJS)\gldll_dummy.obj: ..\..\src\common\dummy.cpp $(CXX) /c /nologo /TP /Fo$@ $(GLDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp $(OBJS)\gldll_version.res: ..\..\src\msw\version.rc - rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_4) $(__NO_VC_CRTDBG_p_64) /d __WXMSW__ $(__WXUNIV_DEFINE_p_58) $(__DEBUG_DEFINE_p_57) $(__EXCEPTIONS_DEFINE_p_57) $(__RTTI_DEFINE_p_57) $(__THREAD_DEFINE_p_57) $(__UNICODE_DEFINE_p_58) $(__MSLU_DEFINE_p_57) $(__GFXCTX_DEFINE_p_57) /i $(SETUPHDIR) /i ..\..\include /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_vc$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_GL ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_4) $(__NO_VC_CRTDBG_p_64) /d __WXMSW__ $(__WXUNIV_DEFINE_p_58) $(__DEBUG_DEFINE_p_57) $(__EXCEPTIONS_DEFINE_p_57) $(__RTTI_DEFINE_p_57) $(__THREAD_DEFINE_p_57) $(__UNICODE_DEFINE_p_58) $(__MSLU_DEFINE_p_57) $(__GFXCTX_DEFINE_p_57) /i $(SETUPHDIR) /i ..\..\include /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_vc$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_GL ..\..\src\msw\version.rc $(OBJS)\gldll_glcmn.obj: ..\..\src\common\glcmn.cpp $(CXX) /c /nologo /TP /Fo$@ $(GLDLL_CXXFLAGS) ..\..\src\common\glcmn.cpp diff --git a/build/msw/makefile.wat b/build/msw/makefile.wat index 3f859e9238..79f7826540 100644 --- a/build/msw/makefile.wat +++ b/build/msw/makefile.wat @@ -3129,6 +3129,10 @@ __GFXCTX_DEFINE_p = !ifeq USE_GDIPLUS 1 __GFXCTX_DEFINE_p = -dwxUSE_GRAPHICS_CONTEXT=1 !endif +__OPENGL_DEFINE_p = +!ifeq USE_OPENGL 1 +__OPENGL_DEFINE_p = -dwxUSE_GLCANVAS=1 +!endif __SETUP_H_SUBDIR_FILENAMES = !ifeq WXUNIV 0 __SETUP_H_SUBDIR_FILENAMES = msw @@ -4460,7 +4464,7 @@ GLDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 -dWXBUILDING -i=..\..\src\tiff\libtiff & -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex & - -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_GL & + -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_GL $(__OPENGL_DEFINE_p) & /fh=$(OBJS)\wxprec_gldll.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) & $(CXXFLAGS) GLDLL_OBJECTS = & @@ -4473,8 +4477,8 @@ GLLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 -dWXBUILDING -i=..\..\src\tiff\libtiff & -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex & - -i=..\..\src\expat\lib /fh=$(OBJS)\wxprec_gllib.pch $(__RTTIFLAG) & - $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) + -i=..\..\src\expat\lib $(__OPENGL_DEFINE_p) /fh=$(OBJS)\wxprec_gllib.pch & + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) GLLIB_OBJECTS = & $(OBJS)\gllib_dummy.obj & $(OBJS)\gllib_glcmn.obj & @@ -15209,7 +15213,7 @@ $(OBJS)\gldll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp $(CXX) -bt=nt -zq -fo=$^@ $(GLDLL_CXXFLAGS) $< $(OBJS)\gldll_version.res : .AUTODEPEND ..\..\src\msw\version.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_wat$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_GL $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_wat$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_GL $(__OPENGL_DEFINE_p) $< $(OBJS)\gldll_glcmn.obj : .AUTODEPEND ..\..\src\common\glcmn.cpp $(CXX) -bt=nt -zq -fo=$^@ $(GLDLL_CXXFLAGS) $< diff --git a/include/wx/motif/setup0.h b/include/wx/motif/setup0.h index 02fc5f2b15..d6dc6c23c2 100644 --- a/include/wx/motif/setup0.h +++ b/include/wx/motif/setup0.h @@ -1070,14 +1070,17 @@ // Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL // headers and libraries to be able to compile the library with wxUSE_GLCANVAS -// set to 1. Note that for some compilers (notably Microsoft Visual C++) you -// will need to manually add opengl32.lib and glu32.lib to the list of -// libraries linked with your program if you use OpenGL. +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). // -// Default is 0. +// Default is 0 unless USE_OPENGL was defined on make command line in which +// case this is predefined as 1. // // Recommended setting: 1 if you intend to use OpenGL, 0 otherwise -#define wxUSE_GLCANVAS 0 +#ifndef wxUSE_GLCANVAS + #define wxUSE_GLCANVAS 0 +#endif // wxRichTextCtrl allows editing of styled text. // diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index bfca4f7812..ced695d6fa 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -1070,14 +1070,17 @@ // Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL // headers and libraries to be able to compile the library with wxUSE_GLCANVAS -// set to 1. Note that for some compilers (notably Microsoft Visual C++) you -// will need to manually add opengl32.lib and glu32.lib to the list of -// libraries linked with your program if you use OpenGL. +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). // -// Default is 0. +// Default is 0 unless USE_OPENGL was defined on make command line in which +// case this is predefined as 1. // // Recommended setting: 1 if you intend to use OpenGL, 0 otherwise -#define wxUSE_GLCANVAS 0 +#ifndef wxUSE_GLCANVAS + #define wxUSE_GLCANVAS 0 +#endif // wxRichTextCtrl allows editing of styled text. // diff --git a/include/wx/msw/wince/setup.h b/include/wx/msw/wince/setup.h index 67a80db3cb..9cf796b9fb 100644 --- a/include/wx/msw/wince/setup.h +++ b/include/wx/msw/wince/setup.h @@ -1070,14 +1070,17 @@ // Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL // headers and libraries to be able to compile the library with wxUSE_GLCANVAS -// set to 1. Note that for some compilers (notably Microsoft Visual C++) you -// will need to manually add opengl32.lib and glu32.lib to the list of -// libraries linked with your program if you use OpenGL. +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). // -// Default is 0. +// Default is 0 unless USE_OPENGL was defined on make command line in which +// case this is predefined as 1. // // Recommended setting: 1 if you intend to use OpenGL, 0 otherwise -#define wxUSE_GLCANVAS 0 +#ifndef wxUSE_GLCANVAS + #define wxUSE_GLCANVAS 0 +#endif // wxRichTextCtrl allows editing of styled text. // diff --git a/include/wx/os2/setup0.h b/include/wx/os2/setup0.h index 5e6fceb33b..fdaea990ea 100644 --- a/include/wx/os2/setup0.h +++ b/include/wx/os2/setup0.h @@ -1070,14 +1070,17 @@ // Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL // headers and libraries to be able to compile the library with wxUSE_GLCANVAS -// set to 1. Note that for some compilers (notably Microsoft Visual C++) you -// will need to manually add opengl32.lib and glu32.lib to the list of -// libraries linked with your program if you use OpenGL. +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). // -// Default is 0. +// Default is 0 unless USE_OPENGL was defined on make command line in which +// case this is predefined as 1. // // Recommended setting: 1 if you intend to use OpenGL, 0 otherwise -#define wxUSE_GLCANVAS 0 +#ifndef wxUSE_GLCANVAS + #define wxUSE_GLCANVAS 0 +#endif // wxRichTextCtrl allows editing of styled text. // diff --git a/include/wx/osx/setup0.h b/include/wx/osx/setup0.h index 97a080f03c..f3f9ea4b57 100644 --- a/include/wx/osx/setup0.h +++ b/include/wx/osx/setup0.h @@ -1071,14 +1071,17 @@ // Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL // headers and libraries to be able to compile the library with wxUSE_GLCANVAS -// set to 1. Note that for some compilers (notably Microsoft Visual C++) you -// will need to manually add opengl32.lib and glu32.lib to the list of -// libraries linked with your program if you use OpenGL. +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). // -// Default is 0. +// Default is 0 unless USE_OPENGL was defined on make command line in which +// case this is predefined as 1. // // Recommended setting: 1 if you intend to use OpenGL, 0 otherwise -#define wxUSE_GLCANVAS 0 +#ifndef wxUSE_GLCANVAS + #define wxUSE_GLCANVAS 0 +#endif // wxRichTextCtrl allows editing of styled text. // diff --git a/include/wx/palmos/setup0.h b/include/wx/palmos/setup0.h index 7a47a7319d..5bc5ae9d76 100644 --- a/include/wx/palmos/setup0.h +++ b/include/wx/palmos/setup0.h @@ -1070,14 +1070,17 @@ // Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL // headers and libraries to be able to compile the library with wxUSE_GLCANVAS -// set to 1. Note that for some compilers (notably Microsoft Visual C++) you -// will need to manually add opengl32.lib and glu32.lib to the list of -// libraries linked with your program if you use OpenGL. +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). // -// Default is 0. +// Default is 0 unless USE_OPENGL was defined on make command line in which +// case this is predefined as 1. // // Recommended setting: 1 if you intend to use OpenGL, 0 otherwise -#define wxUSE_GLCANVAS 0 +#ifndef wxUSE_GLCANVAS + #define wxUSE_GLCANVAS 0 +#endif // wxRichTextCtrl allows editing of styled text. // diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index e0ecf29bef..a437e1c869 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -1066,14 +1066,17 @@ // Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL // headers and libraries to be able to compile the library with wxUSE_GLCANVAS -// set to 1. Note that for some compilers (notably Microsoft Visual C++) you -// will need to manually add opengl32.lib and glu32.lib to the list of -// libraries linked with your program if you use OpenGL. +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). // -// Default is 0. +// Default is 0 unless USE_OPENGL was defined on make command line in which +// case this is predefined as 1. // // Recommended setting: 1 if you intend to use OpenGL, 0 otherwise -#define wxUSE_GLCANVAS 0 +#ifndef wxUSE_GLCANVAS + #define wxUSE_GLCANVAS 0 +#endif // wxRichTextCtrl allows editing of styled text. // diff --git a/include/wx/univ/setup0.h b/include/wx/univ/setup0.h index 74b5176473..a9166033cc 100644 --- a/include/wx/univ/setup0.h +++ b/include/wx/univ/setup0.h @@ -1069,14 +1069,17 @@ // Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL // headers and libraries to be able to compile the library with wxUSE_GLCANVAS -// set to 1. Note that for some compilers (notably Microsoft Visual C++) you -// will need to manually add opengl32.lib and glu32.lib to the list of -// libraries linked with your program if you use OpenGL. +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). // -// Default is 0. +// Default is 0 unless USE_OPENGL was defined on make command line in which +// case this is predefined as 1. // // Recommended setting: 1 if you intend to use OpenGL, 0 otherwise -#define wxUSE_GLCANVAS 0 +#ifndef wxUSE_GLCANVAS + #define wxUSE_GLCANVAS 0 +#endif // wxRichTextCtrl allows editing of styled text. //