Commit Graph

62 Commits

Author SHA1 Message Date
Maarten Bent
ba6e78ec62 CMake: Enable large file support
Define HAVE_LARGEFILE_SUPPORT and add '_FILE_OFFSET_BITS=64' compile definition.
Make it a PUBLIC definition so it is part of the interface, and defined when importing a target.

Check if fseeko is available, which is used in the large file code.
Also add the compile definition to wxconfig's cppflags, because configure does this too.

Large file support can be disabled with the wxBUILD_LARGEFILE_SUPPORT option, similar to configure's --disable-largefile.

Fixes #22750

(cherry picked from commit 1051dfd1410673a25a767fb3b448c858f493108a)
2023-03-12 21:10:28 +01:00
Vadim Zeitlin
109ae40aed Merge branch 'cmake-gtk-printing' of https://github.com/MaartenBent/wxWidgets
CMake: Add GTK Printing support.

And show the extra toolkit options in the CMake summary, fix using
libnotify and gnomevfs with gtk3 and fix some unused parameter warnings
when using gtk2 or gtk3 on Windows.

See #22745, #22762.

(cherry picked from commit d9a78be16c95ec9b6877cda93d2446b711cc3d4e)
2022-09-03 23:40:00 +02:00
Maarten Bent
c62c7d6728 Use built-in NanoSVG in CMake build by default
Since we do not provide a FindNanoSVG module, we should use the built-in
version of the library by default. And prevent warnings about not being
able to find the package configuration file.

See #22748.

(cherry picked from commit 9b0f715f55169cf983f24d7acc730ea80ba9cbad)
2022-08-29 13:11:30 +02:00
Maarten Bent
a6d05742ac CMake: Disable wxUSE_JOYSTICK by default on non-Linux UNIX systems
(cherry picked from commit ebcec1f8b7941e1808d2713aafd0aac48c75ff7d)
2022-08-14 17:15:51 +02:00
Maarten Bent
603c13aaba CMake: Add support for external NanoSVG library 2022-05-11 01:54:03 +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
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
Vadim Zeitlin
271926fde0 Fix description of wxUSE_SPELLCHECK option in configure and CMake
Don't say that it's only for MSW and GTK 3, as it's also available under
Mac. Also don't use "spellchecking" non-word in the description of a
spell-checking option.

No real changes.
2021-10-17 19:36:56 +02:00
Maarten Bent
d2642b4c07 CMake: Enable wxUSE_SPELLCHECK
Find gspell-1 when using GTK3. Also need to find enchant.h.
2021-10-17 14:55:46 +02: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
Pedro Vicente
26795b7432 Use C++11 by default in CMake build under macOS
Force the use of C++11 standard on macOS to avoid C++11 specific
warnings with clang.

Closes https://github.com/wxWidgets/wxWidgets/pull/2374
2021-05-22 21:30:10 +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
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
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
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
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
Maarten Bent
4ee04daa7c Enable position independent code by default
Add a build option (--disable-pic, wxBUILD_PIC=OFF) to disable it.

Note that it is always enabled for shared libraries and static third party libraries.
2020-08-06 21:43:41 +02:00
Vadim Zeitlin
ff24484952 Add wxUSE_MENUBAR to CMake too
For now there is no dependency on wxUSE_MENUS when using CMake.
2020-07-14 18:16:59 +02:00
Maarten Bent
b1ddd454f8 CMake: add wxUSE_NATIVE_DATAVIEWCTRL option 2020-05-06 01:52:27 +02:00
Maarten Bent
4122511e76 CMake: Add c++20 option, enable setting c++ version for MSVC
MSVC supports setting the CMAKE_CXX_STANDARD since VS2015 update 2.
2020-04-08 22:13:52 +02:00
Maarten Bent
016061311a CMake: Add wxBUILD_FLAVOUR option
It is similar to --with-flavour option from configure.

Mark some build options as advanced.
2020-02-16 21:33:44 +01:00
Tobias Taschner
1afeaa324d
Added new build option wxUSE_WEBVIEW_EDGE 2020-01-10 21:42:18 +01:00
Maarten Bent
6f02c3a897 Add DPI Awareness option to CMake
For VS solutions, the DPI aware manifest is added as additional manifest.
For makefiles, the DPI aware manifest is included via the resource file.

Set the default DPI Awareness to per-monitor.
2019-10-29 23:49:36 +01:00
Maarten Bent
5bf5581dbe CMake: Disable finding X11 session manager by default
This is the same behaviour as configure has.
2019-07-16 22:58:48 +02:00
Deamhan
0be2d94189 CMake: add an option for using preferred release build flags
Add wxUSE_OPTIMISE build option.

See #18436.

Closes https://github.com/wxWidgets/wxWidgets/pull/1399
2019-07-16 18:34:57 +02:00
Vadim Zeitlin
c219b53a2d Merge branch 'cmake-gcc-static' of https://github.com/Deamhan/wxWidgets
Add support for using static CRT libraries with gcc to CMake build.

See https://github.com/wxWidgets/wxWidgets/pull/1398
2019-07-16 18:25:52 +02:00
Deamhan
f4a0ac93e3 CMake: wxUSE_VISIBILITY is non windows option now & -Wl,--exclude-libs=ALL has been added in MinGW case. 2019-07-15 19:13:58 +03:00
Deamhan
242ecbb185
Update build/cmake/options.cmake
Co-Authored-By: Maarten <MaartenBent@users.noreply.github.com>
2019-07-13 18:51:19 +03:00
Deamhan
b92c30191c CMake: Add wxUSE_NO_RTTI option
This is similar to configure --enable-no_rtti option.

Closes https://github.com/wxWidgets/wxWidgets/pull/1405
2019-07-13 16:57:51 +02:00
Deamhan
afcec3eefc CMake: wxBUILD_USE_STATIC_RUNTIME is available for GCC now 2019-07-09 17:48:59 +03:00
Tomay
8deb2cf0bb Add wxUSE_WINSOCK2 wxMSW option to include winsock2.h
Including <winsock.h> and <winsock2.h> is incompatible and if the
application wants to use the latter, it may be convenient to define
wxUSE_WINSOCK2 when building wxWidgets instead of having to work around
winsock.h implicit inclusion from include/wx/msw/wrapwin.h.

Closes https://github.com/wxWidgets/wxWidgets/pull/1122
2019-01-28 00:34:34 +01:00
Maarten Bent
5348b4fa3b CMake: Improve layout of third party libraries summary
Add more external libraries to the summary, like configure does.
2018-12-12 21:28:00 +01:00
Maarten Bent
042b17512e CMake: Check for libSDL only on Unix 2018-12-12 21:28:00 +01:00
Maarten Bent
14570b4fa3 CMake: Find more external libraries
Check for LibNotify, MSpack, XTest and GnomeVFS2.
2018-12-12 21:27:56 +01:00
Tobias Taschner
127b596ada
Initial libcurl wxWebRequest implementation 2018-12-10 19:38:07 +01:00
Tobias Taschner
5f3dc058aa
Prepare additional wxWebRequest backends 2018-12-10 19:37:33 +01:00
Tobias Taschner
d756159f5d
Add common dialog wxCredentialEntryDialog
Prompting for user name and password is a common task.
At least windows provides these dialogs native but this
is just a generic implementation for now.
2018-12-10 19:37:29 +01:00
Tobias Taschner
1090e8f6e9
Add webrequest sample application 2018-12-10 19:37:14 +01:00
Maarten Bent
e984857b0e CMake: Improve webview checks
Try to match behavior of configure.
Fix building webview sample with STC disabled.
2018-12-03 00:20:38 +01:00
Maarten Bent
271ed4d990 CMake: Support SDL audio back-end
Rename UNIX_SOUND_SRC_SDL to UNIX_SOUND_SDL_SRC to match the
signature of other variables (ending with _HDR or _SRC).
2018-12-02 17:45:32 +01:00
Maarten Bent
1c5cbe0a61 CMake: Add support for webkit2 2018-12-02 03:21:33 +01:00
Glen Fletcher
ae1fa08188 Add C++17 to the list of supported C++ Standards in CMake build
Allow building with set(CMAKE_CXX_STANDARD 17).

Closes https://github.com/wxWidgets/wxWidgets/pull/1029
2018-11-20 22:22:01 +01:00
Maarten Bent
e1e5169e4b CMake: enable Direct2D graphics context by default
Disable it when the d2d1.h header is not found.
When using MSVC, match the behaviour of setup.h.
2018-11-04 16:49:14 +01:00
Maarten Bent
5c4741430a CMake: move find_package for lzma and secretstore to init.cmake 2018-11-04 16:35:58 +01:00
Maarten Bent
f1cf525944 Add CMake option to set wxDEBUG_LEVEL
It is no use adding it to the generated setup.h because this section is commented out,
so add it as compiler option instead.
The default option is 'Default' in which case no compiler option is added.
2018-10-25 20:46:31 +02:00
Maarten Bent
1dfe088b4d Support WXQT in CMake 2018-09-30 17:23:57 +02:00
Maarten Bent
0bf459de92 Fix typos and whitespace in CMake files. 2018-08-17 20:00:47 +02:00