Commit graph

3491 commits

Author SHA1 Message Date
Maarten Bent
d48560af0a
CMake: Update cef, download minimal distribution
The full distribution has the debug library, that is not used.
2024-02-24 21:11:51 +01:00
Maarten Bent
4e5ecf866f
CMake: Always use CEF release library 2024-02-24 21:11:48 +01:00
Vadim Zeitlin
57c5aff337 Update autoconf container instructions to use Docker registry
Recommend pulling the container from there instead of building it.

Also provide the (very slightly differing) instructions for using it
with podman.
2024-02-16 00:17:25 +01:00
Václav Slavík
6d48acb5f3 Add unit tests for wxTranslations language lookup 2024-02-13 18:24:43 +01:00
Vadim Zeitlin
33ef342dcc Merge branch 'propgrid-xrc'
Add support for loading wxPropertyGrid from XRC.

See #24274.
2024-02-09 17:20:22 +01:00
Vadim Zeitlin
a401106da0 Merge branch 'cmake-misc' of https://github.com/MaartenBent/wxWidgets
Miscellaneous CMake improvements.

Note that the new required CMake version is 3.5 now.

See #24263.
2024-02-09 17:12:18 +01:00
Maarten Bent
f0061b3c04
CMake: Only keep unicode definitions on Windows 2024-02-04 18:03:06 +01:00
Maarten Bent
f0d2d0e748
CMake: Prevent possible policy warnings 2024-02-04 18:01:36 +01:00
Vadim Zeitlin
f6a1b1a18a Show loading wxPropertyGrid from XRC in the sample
Demonstrate defining wxPropertyGridManager in XRC.
2024-02-03 22:03:17 +01:00
Vadim Zeitlin
edf94f684c Remove dependency on wxxml and wxxrc from wxpropgrid library
It shouldn't, and now doesn't, use these libraries directly and
shouldn't depend on them to avoid introducing unnecessary requirements
for the applications which use it without XRC.
2024-02-03 21:46:15 +01:00
Vadim Zeitlin
8694a1b2f1 Add wxPropertyGrid XRC handler files to the library 2024-01-30 01:55:56 +01:00
Vadim Zeitlin
63bcac8c21 Use -rpath option when linking all the libraries too
Previously this was used only for linking the samples, which ensured
that they found the libraries directly referenced by them, but this
wasn't enough to find the libraries referenced indirectly, via another
library (e.g. wxxml used by wxxrc internally but not necessarily
referenced by the sample using XRC) because DT_RUNPATH is not used in
this case, as documented in Linux ld.so(8).

Ensure that such libraries are found nevertheless by setting runpath
for all the libraries too.

Note that it would probably be more logical to just get rid of
SAMPLES_RPATH_FLAG and use DYLIB_RPATH_FLAG everywhere, but this would
result in a ton of changes, so keep the old variable for now and just
set it to the same value to avoid this and keep the possibility to
change it to a different value if necessary later.
2024-01-29 01:15:40 +01:00
Maarten Bent
e2302a834e
CMake: Use IN_LIST operator instead of list(FIND ) 2024-01-28 18:37:36 +01:00
Maarten Bent
395a61fc9a
CMake: Use user-provided CMAKE_CXX_STANDARD
wxBUILD_CXX_STANDARD is initialized with CMAKE_CXX_STANDARD. But if the user changes
the value of CMAKE_CXX_STANDARD, it would keep using the old wxBUILD_CXX_STANDARD value.
2024-01-28 18:35:04 +01:00
Maarten Bent
57ed33978d
CMake: Group compiler-default checks into a function 2024-01-28 18:32:02 +01:00
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