Commit graph

3476 commits

Author SHA1 Message Date
Maarten Bent
8aad6ba37a
CMake: Abort if Chromium is enabled on Windows with unsupported compiler
The user has explicitly enabled chromium, so we shouldn't continue without it.
2024-01-28 18:31:35 +01:00
Maarten Bent
cf04523ece
CMake: Show wxWebview overview in configuration summary
Show a list of all the back-ends that are available, similar to what configure does.
Make sure to disable wxUSE_WEBVIEW_WEBKIT when it is not used.
2024-01-28 18:31:17 +01:00
Maarten Bent
302ad5f7cd
CMake: Check for OpenGL in imported target
The gl target uses OpenGL libraries, so these must be defined.
Previously, the user has to do this before importing the wxWidget target.
2024-01-28 18:30:33 +01:00
Maarten Bent
a63ba1cc04
CMake: Create wxWidgets::wxWidgets imported target
Use the same name as the target from the official FindwxWidgets module,
so it can be used interchangeable.
2024-01-28 18:27:46 +01:00
Maarten Bent
966c39802e
CMake: Throw a more descriptive error when submodule files do not exist
Instead of having a long list of files that cannot be found, create an
error message that mentions that the git submodule should be checked out.
2024-01-28 18:26:25 +01:00
Maarten Bent
590e033344
CMake: Keep UNICODE defines
So these defines are exported and used by libraries importing wxWidgets.
And also Visual Studio will show the actual character set that is being used.
2024-01-28 18:24:29 +01:00
Maarten Bent
db7f144c1b
CMake: Use simplified system name in configuration summary
There is no need to show the full system name, which included for example the Windows build number.
2024-01-28 18:23:04 +01:00
Maarten Bent
de6a117fda
CMake: Silence the CEF configuration summary
And any other warnings that libcef_dll_wrapper might show, like missing doxygen package.
For debug purposes, add an option CEF_SHOW_RESULTS to keep showing it.
2024-01-28 18:22:09 +01:00
Maarten Bent
c39d2243a0
CMake: Use CEF_RUNTIME_LIBRARY_FLAG
Instead of manually modifying the build flags.
Because libcef_dll_wrapper uses a cached variable, we have to force a cache change.
2024-01-28 18:20:32 +01:00
Maarten Bent
cd7e6308cd
CMake: Generalize determining platform name
It is the same as CMAKE_VS_PLATFORM_NAME. Except for win32, which uses an empty name.
2024-01-28 18:19:20 +01:00
Vadim Zeitlin
5e1890c068 Merge branch 'cef-docs'
CEF-related documentation and build improvements.

See #24230.
2024-01-24 17:44:01 +01:00
Vadim Zeitlin
f265775527 Use C++17 for MSVS wxWebView project
webview_chromium.cpp requires using C++17 as it includes CEF headers
that require it (e.g. they use std::in_place) and we need to use the
same options all files in this project as they share the same PCH, so
just use C++17 for all of them -- it should do no harm.
2024-01-24 00:14:03 +01:00
Vadim Zeitlin
f05177db2a Improve CMake error message if C++17 is not used with CEF
The previous error didn't make sense if CMAKE_CXX_STANDARD wasn't set,
so use a slightly different message in this case.

Also improve the comment explaining why we need C++17 in the first
place.

Co-Authored-By: Maarten Bent <MaartenBent@users.noreply.github.com>
2024-01-24 00:08:04 +01:00
Vadim Zeitlin
fca0c75b2e Don't give an error if compiler supports C++17 by default
Previously CMake would give an error if CMAKE_CXX_STANDARD wasn't
explicitly set to C++17 or greater when using CEF, but this is not
really needed if the compiler supports C++17 without any non-default
options, so check for this too.
2024-01-23 03:45:59 +01:00
Vadim Zeitlin
5480296dd0 Use C++17 when using CEF and not C++14
CEF uses std::in_place_t which is not available in C++14.
2024-01-23 03:29:23 +01:00
Vadim Zeitlin
8463b13c14 Don't use -Wno-extra with MSVS when building wxWebviewChromium
Only set it for the other compilers.

This fixes a problem introduced in 26025e2652 (Disable -Wextra when
building libcef_dll_wrapper, 2023-12-29).
2024-01-23 03:29:04 +01:00
ali kettab
9e61385878 Add wxRendererNative implementation for wxQt
Closes #24223.
2024-01-23 03:22:06 +01:00
Lauri Nurmi
99bc43cefe Introduce minimal MSW ARM support
wxMSW could already be compiled for ARM with MSVC, but due to not
defining any ARCH_SUFFIX for ARM, makefile.vc used to place objectsi
and libraries to the same folder as x86 objects and libraries.

A completely different question is what kind of Windows runs on 32-bit
ARM, and whether one can run regular desktop apps on it.

This commit mimics what f69dbaa1 did for ARM64, and adapts it for ARM.

Closes #24222.
2024-01-21 01:48:16 +01:00
Vadim Zeitlin
0fa605abb5 Only use CMAKE_BUILD_TYPE to set wxHAVE_CEF_DEBUG if it's defined
If it isn't, as is the case for MSVS for example, we don't need to set
wxHAVE_CEF_DEBUG anyhow, as it's set automatically if _DEBUG is defined
during the build.

Co-Authored-By: Maarten Bent <MaartenBent@users.noreply.github.com>
2024-01-20 02:13:46 +01:00
Vadim Zeitlin
ff59ef301b Merge branch 'master' into webview-chromium 2024-01-17 00:22:39 +01:00
Vadim Zeitlin
3b06ab65ff Don't set CMAKE_CXX_STANDARD to 11 by default
Use the compiler default C++ dialect if it is C++11 or higher and only
explicitly request C++11 if the compiler can't compile a small test
using C++11 features by default.

This prevents from unnecessarily adding -std=c++11 to the compiler flags
under Unix, even with compilers using e.g. C++17 by default.
2024-01-06 13:59:09 +01:00
Vadim Zeitlin
83d69a1cd9 Revert "Add debug postfix to libcef_dll_wrapper"
This reverts commit 3d51977acf because
it's incompatible with the library names created by CMake when building
CEF directly, and not via wx CMake files.
2024-01-06 03:20:50 +01:00
Vadim Zeitlin
5faa70503a Fix name in the comment for wx_check_c_source_compiles()
No real changes.
2024-01-04 03:25:07 +01:00
Vadim Zeitlin
acf113f3f9 Update copyright years to 2024
Just run misc/scripts/inc_year and commit the results.

See #18690.
2023-12-31 18:56:06 +01:00
Vadim Zeitlin
faec76990e Define wxHAVE_CEF_DEBUG when building CEF wrapper in debug
We need to define NDEBUG when using release build of the wrapper only,
so don't do it if it was built in debug by CMake.
2023-12-30 02:54:54 +01:00
Vadim Zeitlin
adedb499f5 Relax C++ standard requirement when using wxWebviewChromium
Although building CEF itself requires C++17, C++14 is sufficient for
building libcef_dll_wrapper, so allow using it.

Also move the error message a bit more informative.
2023-12-30 02:27:11 +01:00
Vadim Zeitlin
26025e2652 Disable -Wextra when building libcef_dll_wrapper
If it is enabled (e.g. globally because the application using wxWidgets
as a submodule enables it), it would result in a harmless warning about
not calling the base class ctor in base/cef_callback_internal.cpp.
2023-12-29 23:30:14 +01:00
Paul Cornett
ce1d317768 Remove GLU dependency
See #23721
2023-12-28 14:49:42 -08:00
Maarten Bent
3d51977acf
Add debug postfix to libcef_dll_wrapper 2023-12-24 18:06:14 +01:00
Vadim Zeitlin
99434fa005 Add wx/persist/combobox.h to the headers list
In particular this ensures that it is installed by "make install".

See #24157.
2023-12-22 18:43:57 +01:00
Maarten Bent
dbf1eb91ce
CMake: Show macOS architecture in configuring summary 2023-12-21 21:31:04 +01:00
Maarten Bent
6b6c5f5378
CMake: Fix building webview sample with Chromium
The macOS code is based on the cefsimple example in the cef distribution.
2023-12-21 21:27:14 +01:00
Maarten Bent
62c6533fa7
CMake: Update webview related checks 2023-12-21 21:26:41 +01:00
Maarten Bent
3453d8c97d
CMake: Fix building libcef_dll_wrapper
Check for 'libcef_dll' instead of 'cef_paths.gypi', because the minimal distribution doesn't contain the last one.
Mark all CEF variables as advanced, so they don't show up in the default CMake GUI.
2023-12-21 21:19:16 +01:00
Maarten Bent
256b7e4046
CMake: Update CEF to latest version
Support more architectures.
2023-12-21 21:19:06 +01:00
Viachaslau Lisouski
ca405352e0 Add wxFileSystemHandler for "data" scheme
This notably allows embedding images directly in HTML.

Closes #24138.
2023-12-18 22:19:11 +01:00
Vadim Zeitlin
eabaec546b Restore "wxSuffix" MSBuild macro for compatibility
Restore the macro removed in 0d6f2f2b85 (Remove wxSuffix from MSBuild
files, it's always "u" now, 2022-10-28) as it can still be used in the
user projects importing wx properties files and it doesn't cost anything
to keep it.
2023-12-18 15:06:33 +01:00
Vadim Zeitlin
6f501fd022 Merge branch 'qt-overlay' of https://github.com/AliKet/wxWidgets
Add native wxOverlay implementation under wxQt.

See #24080.
2023-12-03 15:00:34 +01:00
Vadim Zeitlin
e90817930a Merge branch 'master' into webview-chromium 2023-11-30 18:30:26 +01:00
PB
c8c3932da6 Remove obsolete options from MSVS .props files
Remove the stuff regarding no longer supported MSVS versions,
Itanium CPU architecture, and Windows XP platform toolset.

Closes #24101.
2023-11-30 02:52:25 +01:00
Blake-Madden
2c1cdf9c02 Fix typos and repeated words in comments and documentation
Closes #24085.
2023-11-30 02:21:34 +01:00
ali kettab
d205e331ce Added native wxOverlay implementation under wxQt 2023-11-23 22:49:15 +01:00
Stefan Csomor
21da0e128d Change wxRendererNative to use NSCell-based methods under Mac
Use wxOSX_USE_NSCELL_RENDERER to allow setting it to 0 to revert to the
old code.

Note that the new version is Objective C++, so the old .cpp file had to
be renamed to have .mm extension.

Closes #24053.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2023-11-17 01:12:49 +01:00
Vadim Zeitlin
e43f913313 Remove all blank "Modified by:" lines from top comment blocks
Having this line is not useful at all as it doesn't contain any
information and shouldn't be filled in the future as git-shortlog can
provide the information about people who changed the given file more
more reliably than consulting the comments in any case.

Keep the non-blank lines for historical purposes.
2023-10-22 01:22:48 +02:00
ali kettab
032fc66cea Now wxTimePickerCtrl is a native control under wxQt 2023-10-15 13:35:24 +01:00
ali kettab
e20d8ba2cc Now wxDatePickerCtrl is a native control under wxQt 2023-10-15 13:35:24 +01:00
ali kettab
4faf201a08 Use the generic implementation of wxPalette under wxQt
Until now, wxPalette under wxQt was just a dummy implementation
Let's turn to the generic one which works perfectly under wxQt too.
2023-10-15 00:10:02 +01:00
Maarten Bent
b9b0724de1 CMake: fix RegularExpression::compile errors
When the wxWidgets sources are in a path containing '++', CMake would
show errors on the command line:

[cmake] RegularExpression::compile(): Nested *?+.
[cmake] RegularExpression::compile(): Error in compile

This happens because the full path was interpreted as a regular
expression when creating the source_groups. Without wxSOURCE_DIR the
regular expressions still match and create correct source groups, so
remove it.

Closes #22738.

Closes #23943.
2023-10-06 01:06:06 +02:00
Vadim Zeitlin
ae8619b6dd 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.
2023-09-15 01:56:08 +02:00
Vadim Zeitlin
9f2fce3859 Ensure that libcef.so is loaded first in webview sample
Use --no-as-needed linker flag to make this happen as otherwise it is
still loaded after libc.so (unless LD_PRELOAD is used).
2023-09-06 03:50:34 +02:00