Commit Graph

333 Commits

Author SHA1 Message Date
tamasmeszaros
60c620c28c Fix libraries names when cross compiling on Linux using CMake
This allows using wxWidgets libraries from CMake when cross-compiling
too.

Closes https://github.com/wxWidgets/wxWidgets/pull/2291
2021-04-04 17:06:45 +02:00
Stefan Csomor
5452d7235e adding missing framwork to CMake 2021-04-03 22:32:34 +02:00
Vadim Zeitlin
e442d90b0d Merge branch 'webrequest-build-fixes' of https://github.com/MaartenBent/wxWidgets
wxWebRequest-related build fixes for MinGW.

See https://github.com/wxWidgets/wxWidgets/pull/2283
2021-03-23 14:16:07 +01:00
Maarten Bent
3cc48e2e56 Fix checking __MINGW64_VERSION_MAJOR for wxUSE_WEBREQUEST_WINHTTP
It is not yet defined for setup.h, so check it in chkconf.h.
Fixes #19105
2021-03-23 00:39:16 +01:00
Vadim Zeitlin
1cdf59ff92 Remove "basic STL functionality" configure and CMake checks
This check didn't work in configure when using C++17 or later, as
std::bind2nd() is removed in C++17 and so was worse than useless as it
actually prevented --enable-stl from working.

And while it was only done when using C++98 in CMake, it still seems
pretty useless there too as there should be no environments in which
basic stuff like std::vector<> or std::find_if() is not available.

So just remove it entirely.
2021-03-22 18:38:10 +01:00
Tobias Taschner
c69193d3da CMake: enable more warnings for GCC/Clang
Enable the same warnings for GCC and Clang as are
enabled with a configure build
2021-03-17 12:58:17 +01:00
Stefan Csomor
d1efcc374b Adding GLKit to console and cmake builds 2021-03-15 14:09:07 +01:00
Vadim Zeitlin
2551df746d Merge branch 'cmake-mono-webview' of https://github.com/MaartenBent/wxWidgets
CMake: fix monolithic build with webview.

See https://github.com/wxWidgets/wxWidgets/pull/2269
2021-03-09 21:44:27 +01:00
Maarten Bent
0bb9cd004d CMake: copy webview2 loader for monolithic build 2021-03-08 00:26:24 +01:00
Maarten Bent
3198ed0b18 CMake: reset webview2 package dir if it does not exist anymore
And make the variable internal so it does not create an 'Ungrouped Entries' group in cmake-gui.
2021-03-07 22:06:46 +01:00
Maarten Bent
560656c699 CMake: do not use target webview in monolithic build 2021-03-07 22:06:46 +01:00
Vadim Zeitlin
39a46db345 Merge branch 'gtk-x-checks-simplify'
Simplify X11 checks and make them work when using Wayland-only GTK.

See https://github.com/wxWidgets/wxWidgets/pull/2261
2021-03-05 18:52:23 +01:00
Vadim Zeitlin
9a84e0b25e Don't require X11 in CMake builds using Wayland-only GTK
X11 headers and libraries are only required if we're actually using X11
which may not be the case.

This allows to build wxGTK on the systems using Wayland-only GTK.
2021-03-01 13:32:57 +01:00
Maarten Bent
272c903234 Silence unknown pragmas warning in the WebView2 header
Using wxGCC_WARNING_SUPPRESS(unknown-pragmas) around the webview2 header does
not work, so suppress it for the entire webview project.
2021-03-01 00:09:23 +01:00
Maarten Bent
09bc566b60 Support building wxWebViewEdge with GCC or Clang
Add EventToken.h with EventRegistrationToken implementation, that can be used by the WebView2 header.
2021-03-01 00:09:23 +01:00
Tobias Taschner
1ee05c54ed CMake: Download SDK when wxUSE_WEBVIEW_EDGE=ON
Automatically download the WebView2 SDK from nuget (official repo for the SDK)
when enabling wxUSE_WEBVIEW_EDGE to simplify usage.
Copying to 3rdparty/webview2 is still supported optionally.
2021-02-08 21:29:08 +01:00
Maarten Bent
b3b5cde7f5 CMake: Mark some build options as advanced 2021-02-07 20:34:42 +01:00
Maarten Bent
9585e08365 CMake: Add benchmarks
Put each benchmark application in a sub-directory instead of specifying all in one
file, because cotire cannot create PCH targets for the same file twice (bench.cpp).
2021-02-07 20:34:42 +01:00
Maarten Bent
7b79423470 CMake: Add argument to specify console app that uses gui libraries 2021-02-07 20:11:56 +01:00
Artur Wieczorek
e73cb85246 Add tests of wxGraphicsBitmap 2021-02-05 23:52:29 +01:00
Maarten Bent
c8a71bc631 CMake: Enable wxUSE_WEBVIEW_EDGE when WebView2 SDK is detected
Only for MSVC >1800 (Visual Studio 2017, vc140) and later.
2021-01-19 22:43:09 +01:00
Maarten Bent
6dfb96c075 CMake: Use build directory as ctest working directory
Use existing variable for VS working directory.
2021-01-19 19:58:46 +01:00
Maarten Bent
226a3de596 CMake: Use common function for adding samples, tests and demos 2021-01-19 19:58:46 +01:00
Vadim Zeitlin
febd185fc6 Merge branch 'web-request'
Add wxWebViewRequest and related classes allowing to use HTTPS and
HTTP/2.

See https://github.com/wxWidgets/wxWidgets/pull/977
2021-01-17 18:19:47 +01:00
Vadim Zeitlin
717e6590bd Merge branch 'macos_wkwebview' of https://github.com/TcT2k/wxWidgets
Use WKWebView for wxWebView Implementation under Apple systems.

See https://github.com/wxWidgets/wxWidgets/pull/2113
2021-01-16 16:20:58 +01:00
Artur Wieczorek
1527927643 Add new wxImageList test files to CMake 2021-01-13 09:03:04 +01:00
Vadim Zeitlin
a2a409f7a5 Remove references to non-existent wxWebRequest headers
Remove the platform-specific wxWebRequest headers from the files lists
and from MSVS 200x project files.

This should have been done in e5bd5a926c (Move backend-specific
wxWebRequest headers to private subdirs, 2020-12-26) manually, as
update-setup-h script doesn't remove the old files from the variable
definitions.

It notably fixes CMake build under MSW and Mac, which failed due to not
finding the referenced files.
2020-12-30 14:36:06 +01:00
Vadim Zeitlin
7b6c4cb9e9 Include required module before using check_c_source_compiles()
Fix CMake build with 3.10, which gave the following errors

CMake Error at build/cmake/init.cmake:321 (check_c_source_compiles):
  Unknown CMake command "check_c_source_compiles".
Call Stack (most recent call first):
  build/cmake/main.cmake:16 (include)
  CMakeLists.txt:69 (include)

previously. Apparently the required CheckCSourceCompiles module was
already included from somewhere else with later CMake versions, but not
with this one, so do include it explicitly.
2020-12-30 14:26:06 +01:00
Vadim Zeitlin
e5bd5a926c Move backend-specific wxWebRequest headers to private subdirs
There is no need to make these headers public and keeping them private
will allow making backwards-incompatible changes to them in the future.
2020-12-26 17:00:07 +01:00
Maarten Bent
13d0e0a152 Fix linking with libcurl under MSW when using CMake
Enable CMP0060 policy to use full path for the library.
2020-12-26 15:56:56 +01:00
Maarten Bent
32a0c57f7a CMake: mark WEBKIT2_JS_LIBRARY as advanced 2020-12-23 17:03:07 +01:00
Tobias Taschner
6d7f35090d Removed macOS only wxWebKitCtrl
This macOS only class duplicated functionality and code of wxWebView.
2020-12-14 10:17:35 +01:00
Maarten Bent
ab795fa68c Check for winhttp.h presence in CMake too 2020-12-13 16:35:34 +01:00
Vadim Zeitlin
181be127a5 Simplify wxUSE_WEBREQUEST_XXX logic
Remove automatic definition of wxUSE_WEBREQUEST depending on whether
wxUSE_WEBREQUEST_XXX are defined and follow the same approach as with
wxUSE_GRAPHICS_XXX, i.e. define wxUSE_WEBREQUEST_XXX as wxUSE_WEBREQUEST
by default instead.

Move wxUSE_WEBREQUEST_WINHTTP to wxMSW-specific file, it doesn't need to
be in common one (unfortunately this can't be done for the Mac-specific
wxUSE_WEBREQUEST_URLSESSION yet, because macOS-specific settings are not
injected into setup.h.in currently).

Also fix test for winhttp.h availability: it seems to be present in all
MinGW64 distributions, but not in MinGW32, so test for this and not for
gcc version.

Finally remove the now unnecessary test for macOS 10.9, as we only
support 10.10+ anyhow by now.
2020-12-13 16:34:47 +01:00
Maarten Bent
b7450f52ff Fixes to CMake build files for wxWebRequest
Fix wrong library name in wx_add_sample() for webrequest.

Also prefer to disable wxWebRequest if no backends for it are available,
for consistency with the other libraries.
2020-12-13 14:36:31 +01:00
Vadim Zeitlin
6bdab7b3c8 Merge branch 'master' into web-request
Merge with the latest master in preparation for merging into master.

Rebake to resolve conflicts in generated files.
2020-12-12 18:12:25 +01:00
Maarten Bent
badf0eb64e CMake: add image test files 2020-10-20 21:11:17 +02:00
Maarten Bent
b1653024d6 CMake: remove HAVE_VARIADIC_MACROS check 2020-10-20 20:39:05 +02:00
Vadim Zeitlin
da3aef753e Remove variadic macros test from configure
This is useless, all still supported compilers except ancient MSVS
versions (for which configure is not used anyhow) support variadic
macros, so don't waste time testing for them.

Note that the checks for HAVE_VARIADIC_MACROS in the sources are still
left because it is still possible to explicitly disable variadic macros
support using --disable-vararg_macros for strict C++98 compatibility.
2020-10-20 01:59:00 +02:00
Vadim Zeitlin
426a0ed527 Remove HAVE_W32API_H definition and checks
All still supported versions of MinGW/Cygwin provide w32api.h file, so
there is no need to test for it.

This allows to simplify the code, but also remove the definition of
HAVE_W32API_H from bake- and makefiles and this, in turn, allows to get
rid of extra flags in MinGW format entirely, as we don't support gcc
2.95 for which they were originally needed neither.
2020-10-20 01:47:47 +02:00
Maarten Bent
62896efd70 CMake: disable wxUSE_GLCANVAS_EGL in non-GTK3 builds
Closes #18947
2020-10-18 18:53:56 +02:00
Maarten Bent
0417dabdbd CMake: use correct media sources in WXQT build
Only check for gstreamer in Unix GTK builds.

Closes #18945
2020-10-18 15:21:31 +02:00
Václav Slavík
40e5152cfc Remove WX_WEB_EXTENSIONS_DIRECTORY define
wxWidgets already has a mechanism for locating plugins under
$libdir/wx/*, there's no reason to duplicate it with another
compile-time symbol.

As a consequence, this makes the library relocatable via WXPREFIX again.
2020-10-05 16:54:16 +02:00
Václav Slavík
737e9be2d0 CMake: use same location for web-extensions as Bakefile
Fix the location where the web-extension plugin is installed to be
consistent with the primary bakefile-based build system: i.e. to use
lib/wx/x.y.z for devel versions and lib/wx/x.y for stable.
2020-10-05 16:54:16 +02:00
Maarten Bent
56521ad8af CMake: add missing test files
Add the source files present in the bkl but not CMakeLists.txt to the
latter one too.

Also link with AUI library now that a test file using it is included.

Closes https://github.com/wxWidgets/wxWidgets/pull/2064
2020-09-29 03:30:15 +02:00
Thomas Khyn
d9deaa8b76 Allow CMake dependencies to be interfaces
In some cases (see https://github.com/bincrafters/community/issues/1181),
the dependencies can be library interfaces.

As CMake's get_target_property is not tolerant about what properties can
be extracted on different library types, it is necessary to make a
distinction between interface libraries and plain libraries.

Closes https://github.com/wxWidgets/wxWidgets/pull/2058
2020-09-29 03:27:38 +02:00
Paul Cornett
85d63c3150 Add a class derived from GtkImage to support HiDPI bitmaps
And use it to get HiDPI support wherever we use GtkImage. This extends and
consolidates support for custom drawing of images which has already been added
somewhat redundantly in several places.
2020-09-15 11:52:03 -07:00
Scott Talbert
35f2fd4be7 Fix linking issues with wxGLCanvasEGL for cmake
1) Link with EGL and wayland-egl libraries (with check for GDK Wayland).
2) Provide a way to force disable the EGL backend.
2020-09-12 15:54:15 -07:00
Scott Talbert
7cd12a2bd6 Add EGL-based backend for wxGLCanvas
Among other things, this enables wxGLCanvas to be used natively on
Wayland.

Closes https://github.com/wxWidgets/wxWidgets/pull/2038

Closes #17702.
2020-09-01 15:03:30 +02:00
Vadim Zeitlin
30b37b610d Revert "Merge branch 'string-art-ids'"
This reverts commit 8c9ba23eae, reversing
changes made to 5192feb38e.

Upcoming commits will try to work around the issues with art IDs related
to wxNO_IMPLICIT_WXSTRING_ENCODING in a different way.
2020-08-24 16:47:37 +02:00