Commit Graph

98 Commits

Author SHA1 Message Date
Tobias Taschner
77db8b7d54 Fix MSW lib names for ARM64 with CMake build
Any 64 platform had the added _x64 suffix. This will now be _arm64
when building for ARM64.

See #23347, #23355.

(cherry picked from commit 1edb38b54892273f2f932339d49b91f7b60fd3a4)
2023-07-03 02:56:23 +02:00
Vadim Zeitlin
ec7120a1ba CMake: use output directory under wx directory in the build tree
This is a combination of the following commits from master:

85105681d3 Use wxSOURCE_DIR and wxBINARY_DIR in config.cmake for consistency
1212247f3d Download WebView2 under current, and not top level, directory
3dcb7a415f Use output directory under wx directory in the build tree

See #22814.

(cherry picked from commit 359138321eef76af0fc62aeca084af0f940b1e4d)
2022-09-24 15:39:36 +02:00
Thomas Klausner
ad239fd80e Fix dlopen() detection in CMake under non-Linux systems.
Linux (until recently) defined dlopen() in libdl, but some other
operating systems (such as NetBSD) have it in libc.

Use CMake-provided variable for the name of the library to use for
dlopen() to fix NetBSD build.

Closes #22644.

(cherry picked from commit 9efe21b55a162f970bbbc187c2127068fef5bd74)
2022-07-24 18:31:00 +02:00
Maarten Bent
40847aef4b CMake: Fix building with wxUSE_WEBVIEW_EDGE_STATIC
Add the directory only to the build interface, not to the install
interface. INTERFACE_LINK_DIRECTORIES can't use paths that are prefixed
in the source (or build) directory.

Closes #22524.
2022-06-16 13:02:15 +01:00
Maarten Bent
86b33600bc CMake: Check all known NanoSVG target names 2022-05-11 01:55:19 +02:00
Maarten Bent
138d1ab021 CMake: Support header-only NanoSVG library
Check if the NanoSVG target defines any library locations.
Add a private compile definition to wxcore, instead of adding another setup.h option.
2022-05-11 01:55:19 +02:00
Maarten Bent
603c13aaba CMake: Add support for external NanoSVG library 2022-05-11 01:54:03 +02:00
Maarten Bent
fb8e860c05 CMake: Include third-party library directories when they are defined
Recent versions of CMake's FindJPEG also has the _DIRS variant.
2022-05-05 22:07:52 +02:00
Maarten Bent
a2ddfcf80b CMake: Fix warning when copying inplace config
Quote all parameters to ensure paths are handled properly.
2022-04-20 20:33:28 +02:00
Maarten Bent
24e20d80e3 CMake: Enable building with Cairo renderer on MSW without GTK 2022-04-20 20:33:18 +02:00
kkocdko
02741a6c92 CMake: Fix build with wxBUILD_MONOLITHIC
Add wxUSE_WEBVIEW test before using wx_webview_copy_webview2_loader.

Closes #22315, #22316.
2022-04-16 15:38:44 +02:00
Maarten Bent
681e32f521 CMake: Add IS_MONO option to wx_add_library and wx_set_target_properties
Use this instead of checking for the target name.
2022-04-12 22:08:45 +02:00
Maarten Bent
d61c9ee4bf CMake: Apply source groups using a function
This will add source groups to all projects, not only libraries.
And there is no need anymore to include it in every project file.
2022-04-11 23:18:58 +02:00
Maarten Bent
7683219f90 CMake: Remove duplicate and unused defines
Remove unused CMake code to get number of mono source files.
wxUSE_BASE=1 is also defined in wx_set_target_properties.
There seems no reason to define _LIB and DLL_EXPORTS, wx does not use it. They
were probably added because the vcxproj files have them.
2022-04-10 23:44:59 +02:00
Maarten Bent
f00e7ced27 CMake: Fix monolithic build
Don't target net and webview libraries directly, but use the wx_ function that will add it to the mono library when applicable.
2022-04-10 21:00:39 +02:00
Maarten Bent
0125a52376 CMake: Improve handling plugin in wx_set_target_properties
Don't link with toolkit or wx libraries, and set the correct defines.
2022-04-10 21:00:39 +02:00
Maarten Bent
f4367b3fee CMake: Use target_precompile_headers when available
Keep using cotire for CMake versions older than 3.16, or when user specifies wxBUILD_PRECOMP=COTIRE.
The scintilla headers need to be specified for target_precompile_headers to work.
Enable it when the target has at least 2 source files (same as cotire does).
2022-04-10 20:46:56 +02:00
Maarten Bent
614d58bf38 CMake: Set precompiled headers when adding libraries
Combine the three pch related functions into one.
2022-04-10 20:46:56 +02:00
Maarten Bent
affbbce1a3 CMake: Make all target_compile_definitions private
It is only used to build scintilla, no need to expose these definitions to external projects.
2022-04-10 20:46:53 +02:00
Maarten Bent
de495c19a3 CMake: Make all target_include_directories private
There is no need to expose them to external projects.
2022-04-10 20:46:26 +02:00
Tobias Taschner
57ebad4f7d
Allow usage of static loader with wxWebViewEdge
Add a new build option wxUSE_WEBVIEW_EDGE_STATIC.
If it is set to 1 the WebView2 loader is static linked into the binary
and removes the runtime dependency on WebView2Loader.dll.
2022-02-07 22:49:33 +01:00
Maarten Bent
d07377fdf7 CMake: Use PCRE2 system library when available
Similar to other system libraries, use the builtin version on Windows and macOS
and try to find the system library on Unix.

Find the correct PCRE2 library based on the code point width that will be used.
2021-07-25 12:23:07 +02:00
Vadim Zeitlin
3d8438619d Use PCRE as built-in regex library
Replace the use of Henry Spencer's regex library with PCRE at the build
level and enable wxUSE_PCRE in wxRegEx code to switch to PCRE-based
implementation there.

Note that this has to be done unconditionally because there is no simple
way to select between the previously used regex library and PCRE at the
makefiles level.

We could still keep the possibility to use the system regex library
under Unix, but this doesn't seem to be worth doing, as we don't support
Unicode REs properly when using it (and never did), so drop support for
this too.
2021-07-24 19:17:59 +02:00
CPUBug
67d9eb2541 Fix wxNet build problem when cross-compiling using CMake
Fix the case of "winhttp" library, this is important when using
case-sensitive file systems.

Closes https://github.com/wxWidgets/wxWidgets/pull/2409
2021-07-03 14:24:20 +01:00
Maarten Bent
6f34937993 CMake: Improve webkit plugin name 2021-06-06 23:38:38 +02:00
Stefan Csomor
5452d7235e adding missing framwork to CMake 2021-04-03 22:32:34 +02: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
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
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
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
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
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
f25a88a13d CMake: allow to use build-in libraries on Linux
Requires updates of expat and tiff submodules.

Most libraries have their own CMakeLists, add a comment with a suggestion to
use this for implementing build-in support.
2020-08-03 21:33:37 +02:00
Maarten Bent
5041915001 CMake: fix building media and gl lib for iOS 2020-06-18 20:28:19 +02:00
Maarten Bent
3ab4d9461b CMake: add missing libraries for iOS build
Remove unused section from file list.
2020-06-18 20:28:12 +02:00
Vadim Zeitlin
a087d7c8da Merge branch 'fix-stc-ime' of https://github.com/wangqr/wxWidgets
Fix position of IME in wxSTC in wxMSW.

See https://github.com/wxWidgets/wxWidgets/pull/1852
2020-05-25 01:33:00 +02:00
Maarten Bent
0f806ad96d CMake: use wx prefix in library names
Rename all library targets to start with wx. This way it does not use generic
names like base or core that could interfere with other libraries that add
include the wxWidgets project.
2020-05-17 20:01:02 +02:00
wangqr
f730da3c14 Add imm32.lib to wxStyledTextCtrl 2020-05-11 00:37:56 -04:00
Maarten Bent
f226fc0c76 Enable SSE2 in libpng build 2020-04-19 16:31:22 +02:00
Maarten Bent
f67a7c08f7 Allow to build libpng on more platforms
Add the hardware-specific source files to the build systems. Do not add MIPS
and PowerPC to MSVC build files, because these include <stdint.h> which is not
available for old MSVC versions.
2020-04-19 16:31:22 +02:00
Tobias Taschner
41f4a21736
Apply suggestions from code review
Co-Authored-By: Maarten <MaartenBent@users.noreply.github.com>
2020-01-16 10:15:11 +01:00
Tobias Taschner
6750d30102
Load WebView2Loader.dll dynamically 2020-01-10 22:22:29 +01:00
Markus Pingel
6a99e7e273
Add wxWebView Edge (Chromium) implementation
This backend requires WebView2 SDK and enables usage of Edge (Chromium)
on Windows 7 and newer
2020-01-10 22:22:28 +01:00