mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-10-06 07:00:16 +08:00
The CMake build already supported an external NanoSVG package, but the
Autoconf build always required the bundled 3rdparty/nanosvg copy.
Make --with-nanosvg a WX_ARG_SYS_WITH option ("sys"/"builtin"/"yes"/"no")
and, for the system case, check for <nanosvg/nanosvg.h> where the
distribution packages (Debian, Fedora, ...) install it. If a compiled
nanosvg library is also present, link with it; otherwise compile the
header-only implementation into wxWidgets as was done before.
Include the headers as <nanosvg/nanosvg.h> to match their installed
location, and add the parent of the package include directory in the
CMake helper so this keeps working there for non-standard prefixes.
Also fix build/cmake/lib/nanosvg.cmake to decide whether a compiled
library is available from the imported target type rather than from
hardcoded IMPORTED_LOCATION_<CONFIG> properties: the latter misses
packages that only set IMPORTED_LOCATION_NOCONFIG (e.g. Fedora's),
which made it compile the implementation in and link the shared
library at the same time.
With this it's possible to build against the system NanoSVG development
package with 3rdparty/nanosvg removed entirely.
Closes #26965.
Welcome to wxWidgets for GTK
----------------------------
You have downloaded the GTK port of the wxWidgets GUI library.
This port works best with GTK 3, but also supports versions as
old as GTK 2.6 (although some features are only available when
using GTK+ 2.10 or higher). Note that even if you compile
wxWidgets against a later GTK version, your application will
still work with older GTK versions with the same major version
as wxWidgets tests for the presence of newer features at run-time
and it will fall back to a generic implementation if these
features are not present in the GTK version used.
More information about the wxWidgets project (including all the
other ports and version of wxWidgets) can be found at the
main wxWidgets homepage at:
https://www.wxwidgets.org/
Information on how to install can be found in the file
install.md, but if you cannot wait, this should work on
many systems:
mkdir build_gtk
cd build_gtk
../configure
make
su <type root password>
make install
ldconfig
In order to use wxGTK with GTK 2 you need to use --with-gtk=2
configure option.
Please note that it is strongly advised to build the library in
a separate directory, as shown above, as it allows you to have
different builds of it (for example with and without debug) in
parallel. If you build in the source directory, don't forget to
do "make clean" before changing the configuration!
Please send problems concerning installation, feature requests,
bug reports or comments to the wxWidgets users list. These can
be found at https://www.wxwidgets.org/support/mailing-lists/
Please see the manual for further information.