Don't build separate webview_chromium library
Just include wxWebViewChromium in the webview library if it's enabled during the build. There doesn't seem to be any reason to build a separate library for it, it's not really different from the other disabled by default wxWebView backend (Edge). And now that we don't need to link with an extra library, there is also no need to have a separate webview_chromium sample, so just add a possibility to run webview sample itself using Chromium backend by setting WX_WEBVIEW_BACKEND environment variable.
This commit is contained in:
parent
168ca9403d
commit
ae8619b6dd
36 changed files with 499 additions and 1338 deletions
|
|
@ -185,9 +185,6 @@
|
|||
<set var="WXLIB_WEBVIEW">
|
||||
<if cond="MONOLITHIC=='0' and USE_WEBVIEW=='1'">$(mk.evalExpr(wxwin.mkLibName('webview')))</if>
|
||||
</set>
|
||||
<set var="WXLIB_WEBVIEW_CHROMIUM">
|
||||
<if cond="MONOLITHIC=='0' and USE_WEBVIEW_CHROMIUM=='1' and FORMAT=='autoconf'">$(mk.evalExpr(wxwin.mkLibName('webview_chromium')))</if>
|
||||
</set>
|
||||
<set var="WXLIB_MONO">
|
||||
<if cond="MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))</if>
|
||||
</set>
|
||||
|
|
@ -883,7 +880,8 @@ $(TAB)cl /EP /nologo "$(DOLLAR)(InputPath)" > "$(SETUPHDIR)\wx\msw\rcdefs.h"
|
|||
<!-- Link against one wxWin library. Value must be literal! -->
|
||||
<define-tag name="wx-lib" rules="exe,dll,module">
|
||||
<sys-lib>$(wxwin.libToLink(value))</sys-lib>
|
||||
<ldlibs>$(wxwin.extraLdflags(value))</ldlibs>
|
||||
<ldflags>$(wxwin.extraLdflags(value))</ldflags>
|
||||
<ldlibs>$(wxwin.extraLdlibs(value))</ldlibs>
|
||||
<!-- msvs200?prj formats don't support external dependencies yet: -->
|
||||
<if cond="FORMAT=='msvc6prj' and MONOLITHIC=='0'">
|
||||
<depends-on-dsp>$(wxwin.makeDspDependency(value))</depends-on-dsp>
|
||||
|
|
|
|||
|
|
@ -409,6 +409,7 @@ compiled .lib files and setup.h under the lib/ toplevel directory.
|
|||
<option name="EXTRALIBS_SDL"/>
|
||||
<option name="EXTRALIBS_STC"/>
|
||||
<option name="EXTRALIBS_WEBVIEW"/>
|
||||
<option name="EXTRALDFLAGS_WEBVIEW"/>
|
||||
<option name="WX_CPPFLAGS"/>
|
||||
<option name="WX_CFLAGS"/>
|
||||
<option name="WX_CXXFLAGS"/>
|
||||
|
|
@ -495,6 +496,7 @@ it if SHARED=1 unless you know what you are doing.
|
|||
<if cond="COMPILER=='gcc' and TOOLKIT=='MSW'">-limm32</if>
|
||||
</set>
|
||||
<set var="EXTRALIBS_WEBVIEW"/>
|
||||
<set var="EXTRALDFLAGS_WEBVIEW"/>
|
||||
|
||||
<set var="WITH_PLUGIN_SDL">0</set>
|
||||
|
||||
|
|
@ -559,54 +561,8 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build.
|
|||
<set var="USE_OPENGL">0</set>
|
||||
</if>
|
||||
|
||||
<!--Specify CEF root directory here-->
|
||||
<set var="CEF_INCLUDE_DIR">
|
||||
<!-- Directory where CEF should be available -->
|
||||
<set var="CEF_DIR">
|
||||
$(TOP_SRCDIR)/3rdparty/cef
|
||||
</set>
|
||||
|
||||
<!--specify libcef library directory-->
|
||||
<set var="LIBCEF_PATH">
|
||||
$(CEF_INCLUDE_DIR)/Release/
|
||||
</set>
|
||||
|
||||
<!--specify libcef_dll_wrapper library directory-->
|
||||
<set var="LIBCEF_WRAPPER_PATH">
|
||||
<if cond="PLATFORM_WIN32=='1'">
|
||||
$(CEF_INCLUDE_DIR)/libcef_dll_wrapper/Release/
|
||||
</if>
|
||||
<if cond="PLATFORM_MACOSX=='1'">
|
||||
$(CEF_INCLUDE_DIR)/libcef_dll_wrapper/
|
||||
</if>
|
||||
<if cond="PLATFORM_UNIX=='1'">
|
||||
$(CEF_INCLUDE_DIR)/libcef_dll_wrapper/
|
||||
</if>
|
||||
</set>
|
||||
|
||||
<!-- linker flags needed to link with CEF -->
|
||||
<set var="LIBCEF_LINK">
|
||||
<if cond="PLATFORM_WIN32=='1'">
|
||||
$(LIBCEF_PATH)libcef/libcef.lib
|
||||
</if>
|
||||
<if cond="PLATFORM_MACOSX=='1'">
|
||||
<!-- CEF is a framework and not just a shared library under Mac. -->
|
||||
-F$(LIBCEF_PATH) -framework Chromium\ Embedded\ Framework
|
||||
</if>
|
||||
<if cond="PLATFORM_UNIX=='1'">
|
||||
<!-- We need to make sure that libcef.so is loaded first. -->
|
||||
-L$(LIBCEF_PATH) -Wl,--no-as-needed -lcef -Wl,--as-needed
|
||||
</if>
|
||||
</set>
|
||||
|
||||
<set var="LIBCEF_DLL_WRAPPER_NAME">
|
||||
<if cond="PLATFORM_WIN32=='1'">
|
||||
libcef_dll_wrapper
|
||||
</if>
|
||||
<if cond="PLATFORM_MACOSX=='1'">
|
||||
cef_dll_wrapper
|
||||
</if>
|
||||
<if cond="PLATFORM_UNIX=='1'">
|
||||
cef_dll_wrapper
|
||||
</if>
|
||||
</set>
|
||||
|
||||
</makefile>
|
||||
|
|
|
|||
|
|
@ -2663,12 +2663,16 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||
src/gtk/webview_webkit.cpp
|
||||
src/gtk/webview_webkit2.cpp
|
||||
</if>
|
||||
<if cond="PLATFORM_MACOSX=='1'">src/osx/webview_webkit.mm</if>
|
||||
<if cond="PLATFORM_MACOSX=='1'">
|
||||
src/osx/webview_chromium.mm
|
||||
src/osx/webview_webkit.mm
|
||||
</if>
|
||||
</set>
|
||||
<set var="WEBVIEW_CMN_SRC" hints="files">
|
||||
src/common/webview.cpp
|
||||
src/common/webviewarchivehandler.cpp
|
||||
src/common/webviewfshandler.cpp
|
||||
src/common/webview_chromium.cpp
|
||||
</set>
|
||||
<set var="WEBVIEW_SRC" hints="files">
|
||||
$(WEBVIEW_SRC_PLATFORM)
|
||||
|
|
@ -2694,6 +2698,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||
wx/webview.h
|
||||
wx/webviewarchivehandler.h
|
||||
wx/webviewfshandler.h
|
||||
wx/webview_chromium.h
|
||||
</set>
|
||||
<set var="WEBVIEW_HDR" hints="files">
|
||||
$(WEBVIEW_HDR_PLATFORM)
|
||||
|
|
@ -2704,21 +2709,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||
src/gtk/webview_webkit2_extension.cpp
|
||||
</set>
|
||||
|
||||
<set var="WEBVIEWCHROMIUM_OSX_SHARED_SRC" hints="files">
|
||||
<if cond="PLATFORM_MACOSX=='1'">
|
||||
src/osx/webview_chromium.mm
|
||||
</if>
|
||||
</set>
|
||||
|
||||
<set var="WEBVIEWCHROMIUM_SRC" hints="files">
|
||||
src/common/webview_chromium.cpp
|
||||
$(WEBVIEWCHROMIUM_OSX_SHARED_SRC)
|
||||
</set>
|
||||
<set var="WEBVIEWCHROMIUM_HDR" hints="files">
|
||||
wx/webview.h
|
||||
wx/webview_chromium.h
|
||||
</set>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- wxXRC -->
|
||||
<!-- ====================================================================== -->
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
<ldlibs>$(EXTRALIBS_MEDIA)</ldlibs>
|
||||
<ldlibs>$(EXTRALIBS_STC)</ldlibs>
|
||||
<ldlibs>$(PLUGIN_MONOLIB_EXTRALIBS)</ldlibs>
|
||||
<ldflags>$(EXTRALDFLAGS_WEBVIEW)</ldflags>
|
||||
<ldlibs>$(EXTRALIBS_WEBVIEW)</ldlibs>
|
||||
<library>$(wxscintilla_library_link)</library>
|
||||
<library>$(wxlexilla_library_link)</library>
|
||||
|
|
|
|||
|
|
@ -183,42 +183,21 @@
|
|||
<sources>$(WEBVIEW_SRC)</sources>
|
||||
<library>coredll</library>
|
||||
<library>basedll</library>
|
||||
<ldflags>$(EXTRALDFLAGS_WEBVIEW)</ldflags>
|
||||
<ldlibs>$(EXTRALIBS_WEBVIEW)</ldlibs>
|
||||
<msvc-headers>$(WEBVIEW_HDR)</msvc-headers>
|
||||
<include>$(CEF_DIR)</include>
|
||||
</dll>
|
||||
|
||||
<lib id="webviewlib" template="wx_lib,webview_additional"
|
||||
cond="SHARED=='0' and USE_GUI=='1' and USE_WEBVIEW=='1' and MONOLITHIC=='0'">
|
||||
<sources>$(WEBVIEW_SRC)</sources>
|
||||
<msvc-headers>$(WEBVIEW_HDR)</msvc-headers>
|
||||
<include>$(CEF_DIR)</include>
|
||||
</lib>
|
||||
|
||||
<wxshortcut id="wxwebview" cond="MONOLITHIC=='0' and USE_WEBVIEW=='1'"/>
|
||||
|
||||
<dll id="webviewchromiumdll" template="wx_dll"
|
||||
cond="SHARED=='1' and USE_GUI=='1' and USE_WEBVIEW_CHROMIUM=='1' and MONOLITHIC=='0' and FORMAT=='autoconf'">
|
||||
<define>WXUSINGDLL</define>
|
||||
<define>WXMAKINGDLL_WEBVIEW_CHROMIUM</define>
|
||||
<sources>$(WEBVIEWCHROMIUM_SRC)</sources>
|
||||
<msvc-headers>$(WEBVIEWCHROMIUM_HDR)</msvc-headers>
|
||||
<library>coredll</library>
|
||||
<library>basedll</library>
|
||||
<library>webviewdll</library>
|
||||
<include>$(CEF_INCLUDE_DIR)</include>
|
||||
<lib-path>$(LIBCEF_WRAPPER_PATH)</lib-path>
|
||||
<sys-lib>$(LIBCEF_DLL_WRAPPER_NAME)</sys-lib>
|
||||
<ldflags>$(LIBCEF_LINK)</ldflags>>
|
||||
</dll>
|
||||
|
||||
<lib id="webviewchromiumlib" template="wx_lib"
|
||||
cond="SHARED=='0' and USE_GUI=='1' and USE_WEBVIEW_CHROMIUM=='1' and MONOLITHIC=='0' and FORMAT=='autoconf'">
|
||||
<sources>$(WEBVIEWCHROMIUM_SRC)</sources>
|
||||
<msvc-headers>$(WEBVIEWCHROMIUM_HDR)</msvc-headers>
|
||||
<include>$(CEF_INCLUDE_DIR)</include>
|
||||
</lib>
|
||||
|
||||
<wxshortcut id="wxwebviewchromium" cond="MONOLITHIC=='0' and USE_WEBVIEW_CHROMIUM=='1' and FORMAT=='autoconf'"/>
|
||||
|
||||
<!-- ================================================================ -->
|
||||
<!-- OpenGL -->
|
||||
<!-- ================================================================ -->
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@
|
|||
NOTE: as a reference here is a list of all wxWidgets libraries satisfying
|
||||
the dependency constraints mentioned in <wx-lib> description:
|
||||
|
||||
<wx-lib>webviewchromium</wx-lib>
|
||||
<wx-lib>webview</wx-lib>
|
||||
<wx-lib>richtext</wx-lib>
|
||||
<wx-lib>aui</wx-lib>
|
||||
|
|
@ -124,7 +123,7 @@
|
|||
tag definitions.
|
||||
-->
|
||||
<set var="WX_LIB_LIST">
|
||||
base core net xml xrc html adv media gl qa aui ribbon propgrid richtext stc webview webviewchromium
|
||||
base core net xml xrc html adv media gl qa aui ribbon propgrid richtext stc webview
|
||||
</set>
|
||||
|
||||
<!-- if you define this variable to 0 before including wx presets, the
|
||||
|
|
|
|||
|
|
@ -161,7 +161,6 @@
|
|||
<define-wxlib-name>stc</define-wxlib-name>
|
||||
<define-wxlib-name>richtext</define-wxlib-name>
|
||||
<define-wxlib-name>webview</define-wxlib-name>
|
||||
<define-wxlib-name>webviewchromium</define-wxlib-name>
|
||||
|
||||
<!-- NOTE: The GL lib is not part of the monolithic build; treat it as a contrib! -->
|
||||
|
||||
|
|
@ -203,7 +202,6 @@
|
|||
<if cond="value=='propgrid'"><sys-lib>$(WXLIB_PROPGRID_NAME)</sys-lib></if>
|
||||
<if cond="value=='richtext'"><sys-lib>$(WXLIB_RICHTEXT_NAME)</sys-lib></if>
|
||||
<if cond="value=='webview'"><sys-lib>$(WXLIB_WEBVIEW_NAME)</sys-lib></if>
|
||||
<if cond="value=='webviewchromium'"><sys-lib>$(WXLIB_WEBVIEW_CHROMIUM_NAME)</sys-lib></if>
|
||||
|
||||
<!-- The GL lib isn't part of the monolithic build, treat it as a contrib: -->
|
||||
<if cond="value=='gl'">
|
||||
|
|
|
|||
|
|
@ -39,13 +39,15 @@ def mk_wxid(id):
|
|||
|
||||
# All libs that are part of the main library:
|
||||
MAIN_LIBS = ['mono', 'base', 'core', 'adv', 'html', 'xml', 'net', 'webview',
|
||||
'media', 'qa', 'xrc', 'aui', 'ribbon', 'propgrid', 'richtext', 'stc',
|
||||
'webview_chromium']
|
||||
'media', 'qa', 'xrc', 'aui', 'ribbon', 'propgrid', 'richtext', 'stc']
|
||||
# List of library names/ids for categories with different names:
|
||||
LIBS_NOGUI = ['xml', 'net']
|
||||
LIBS_GUI = ['core', 'adv', 'html', 'gl', 'qa', 'xrc', 'media',
|
||||
'aui', 'propgrid', 'richtext', 'stc', 'ribbon', 'webview',
|
||||
'webview_chromium']
|
||||
'aui', 'propgrid', 'richtext', 'stc', 'ribbon', 'webview']
|
||||
# Additional ld flags
|
||||
EXTRALDFLAGS = {
|
||||
'webview' : '$(EXTRALDFLAGS_WEBVIEW)',
|
||||
}
|
||||
# Additional libraries that must be linked in:
|
||||
EXTRALIBS = {
|
||||
'gl' : '$(EXTRALIBS_OPENGL)',
|
||||
|
|
@ -95,6 +97,12 @@ def libToLink(wxlibname):
|
|||
|
||||
|
||||
def extraLdflags(wxlibname):
|
||||
if wxlibname in EXTRALDFLAGS:
|
||||
return EXTRALDFLAGS[wxlibname]
|
||||
else:
|
||||
return ''
|
||||
|
||||
def extraLdlibs(wxlibname):
|
||||
if wxlibname in EXTRALIBS:
|
||||
return EXTRALIBS[wxlibname]
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue