Commit Graph

71 Commits

Author SHA1 Message Date
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
b102afc316 CMake: Don't include generator expression in wxPLATFORM_LIB_DIR
So wxPLATFORM_LIB_DIR can be used in locations where generator expressions are not supported.
2021-10-17 11:52:30 +02:00
Scott Talbert
28f59e8900 cmake: also link with GLU when using EGL
Fixes #19282
2021-10-11 12:43:52 -04:00
Maarten Bent
cd9a35b997 CMake: generate build.cfg 2021-06-18 00:41:45 +02:00
Maarten Bent
3e0057757b CMake: Use a macro to get the flavour
Also include the flavour in builtin target names and include path.
2021-06-06 23:38:38 +02:00
Maarten Bent
f830bde25b CMake: Improve library names
Use the same output names as MSVC and makefile.gcc/vc on Windows, and the same as configure on other platforms.
2021-06-06 23:36:59 +02:00
Stefan Csomor
d1efcc374b Adding GLKit to console and cmake builds 2021-03-15 14:09:07 +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
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
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
Maarten Bent
ab795fa68c Check for winhttp.h presence in CMake too 2020-12-13 16:35:34 +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
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
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
Stefan Csomor
dedefa65c1 applying CMake patch from @MaartenBent 2020-07-05 15:54:27 +02:00
Maarten Bent
e4437c4974 Add iOS CMake build to Travis CI
Use the following CMake flags:
-DCMAKE_SYSTEM_NAME=iOS - for specifying it is an iOS build
-DCMAKE_FIND_ROOT_PATH=/usr/local - dir to search for the built wxWidgets libraries
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO - don't require signing app packages
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 - specify a target so both the libraries and sample will use the same architecture

Also use the code signing flag when testing precompiled header support.
Don't build the default samples, widgets sample has features that are not supported by the iOS build.

Xcode seems to rebuild the libraries when installing, so call CMake only once.
2020-06-18 21:20:21 +02:00
Maarten Bent
5041915001 CMake: fix building media and gl lib for iOS 2020-06-18 20:28:19 +02:00
Maarten Bent
1ed8197dfa CMake: prevent mismatched package name warnings
Use all caps for the packages.

Closes https://github.com/wxWidgets/wxWidgets/pull/1886
2020-06-09 23:57:53 +02:00
Maarten Bent
e69755c203 CMake: check if the compiler supports using precompiled headers
Build the cotire test project and check if it succeeds. Also check if the
'had text segment at different address' warning does not appear in the build
output. If it does not succeed, disable usage of precompiled headers.

If the PCH option was changed, clean the project and rebuild it again. Do not
clean everytime the project is configured because (re)building the cotire test
project takes some time.
2020-05-17 20:01:01 +02:00
Maarten Bent
5c2d186132 CMake: Add variable to indicate if c++11 or later is enabled
Use it in macOS checks.
2020-04-07 19:28:46 +02:00
Maarten Bent
c8209a5111 CMake: Set wxBUILD_CXX_STANDARD globally instead of only on targets
This way the tests in setup.cmake will use the correct c++ version.
2020-04-07 19:09:58 +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
Maarten Bent
4196c67b72 CMake: Create wx-config for MinGW builds
Use the same output folder for setup.h and wx-config as configure does.
2020-02-16 16:35:24 +01:00
Maarten Bent
ce968d0ecb
Enable building without wxUSE_WEBVIEW_IE 2020-01-17 09:37:12 +01:00
Maarten Bent
a6bfd845b4 CMake: find PangoFT2 when wxUSE_PRIVATE_FONTS is enabled in GTK
Rewrite and simplify FindFontconfig.
2019-11-29 00:21:25 +01:00
Maarten Bent
b42de093f6 CMake: disable wxUSE_MIMETYPE when wxUSE_TEXTFILE is disabled 2019-11-27 21:24:32 +01:00
Maarten Bent
51fc85f16a CMake: disable options when ole or ActiveX is not available 2019-11-27 21:24:32 +01:00
Vadim Zeitlin
d7a640933d Remove wxUSE_WCHAR_T, it must always be 1 anyhow
This is not really an option as building requires it to be 1, so don't
make it one in setup.h/configure/cmake and just hardcode it as 1 for
compatibility.

Closes #18558.
2019-10-31 02:16:19 +01:00
Maarten Bent
7f5ca2a4cb CMake: Fix detecting AppleClang
Policies are now correctly initialized (before creating the project).
Policy CMP0025 changes the compilerID of Clang on Apple, handle this correctly.
2019-07-19 21:13:04 +02:00
Maarten Bent
60b0a1fde2 CMake: Fix MSVC warning when using NMake
Fix warning: Command line warning D9025 : overriding '/W3' with '/W4'
Remove /W3, either via a regex or via new policy CMP0092 (CMake 3.15).

The policy has to be set before calling project(), otherwise the
CMAKE_<LANG>_FLAGS are already initialized.

See https://trac.wxwidgets.org/ticket/18438
2019-07-19 01:09:36 +02:00
Maarten Bent
181a03fc73 CMake: Only use -fno-rtti for C++
Using it for C generates the following warning:
command line option '-fno-rtti' is valid for C++/D/ObjC++ but not for C
2019-07-19 01:09:36 +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
7c8d5dd36d CMake: -Wl,--exclude-libs=ALL has been removed for MinGW 2019-07-16 08:24:24 +03: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
pk
1d52cf1d2d CMake: some cleanup 2019-07-15 11:05:43 +03:00
Deamhan
7be4d12749 CMake: pthread symbols has been removed from export (MinGW) 2019-07-15 00:10:45 +03:00
Deamhan
82dfc62a62 CMake: multiple definition issue (MinGW) has been fixed 2019-07-14 23:58:09 +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
59245dd232 CMake: Don't use /EHa for MSVS
This is unnecessary and may result in worse performance for the
generated code.

Closes #18436.

Closes https://github.com/wxWidgets/wxWidgets/pull/1396
2019-07-13 16:23:11 +02:00
Deamhan
fbac773fed CMake: MATCH -> STREQUAL for clang 2019-07-13 00:40:01 +03:00
Deamhan
4742c32c75 CMake: wxBUILD_USE_STATIC_RUNTIME was enabled for clang 2019-07-13 00:29:18 +03:00
pk
b93fce30f3 CMake: CMAKE_COMPILER_IS_GNUCC has been replaced 2019-07-11 12:01:38 +03:00
Deamhan
e0ad857a2d CMake: MinGW multiple definition issue has been fixed (wxBUILD_USE_STATIC_RUNTIME) 2019-07-10 11:30:31 +03:00
Deamhan
afcec3eefc CMake: wxBUILD_USE_STATIC_RUNTIME is available for GCC now 2019-07-09 17:48:59 +03:00
Maarten Bent
9732a2d99f CMake: Allow to toggle between static and dynamic MSVC runtime
After enabling wxBUILD_USE_STATIC_RUNTIME it cannot be disabled again
(except by manually modifying CMAKE_C*_FLAGS_*). Improve this by setting
the build flags to their default value when wxBUILD_USE_STATIC_RUNTIME
is disabled.

Closes https://github.com/wxWidgets/wxWidgets/pull/1338
2019-06-07 16:39:16 +02:00
Maarten Bent
6be0e7749c CMake: don't search SDL on macOS
It doesn't compile when enabled.
2019-02-03 19:01:00 +01:00
NikitaFeodonit
3510319048 CMake: add processing the C flags for wxBUILD_USE_STATIC_RUNTIME 2019-01-21 13:45:46 +03:00