Commit Graph

114 Commits

Author SHA1 Message Date
PB
bf2a0527cb FindwxWidgets: Add link dependencies for Windows
Since wxWidgets v3.3, linking against gdiplus and msimg32
Windows libraries is required.
2024-08-18 20:53:50 +02:00
Maarten Bent
90b77e3783 FindwxWidgets: link with lexilla
In wxWidgets 3.3 (development version) the Scintilla library has been
split into two components: Scintilla and Lexilla.
2023-11-01 08:20:56 -04:00
Maarten Bent
f8831a0c9e FindwxWidgets: Convert include and library paths to cmake-style
This fixes DBG_MSG errors when a path uses \ instead of /.
2023-11-01 08:20:46 -04:00
Maarten Bent
d76242ed9f FindwxWidgets: Prevent searching libraries multiple times
If the user has specified common libraries, remove the duplicates.
2023-11-01 08:20:46 -04:00
Maarten Bent
55072adf16 FindwxWidgets: Improve linking with scintilla
Treat scintilla like any other common lib. Only add it when the stc
component is specified. Add imm32 to the list of required libraries
when stc is used.

Fixes: #23519
2023-11-01 08:20:46 -04:00
Maarten Bent
c5e3d12213 FindwxWidgets: Move wx-config specific checks inside UNIX find-style 2023-11-01 08:20:25 -04:00
Maarten Bent
625023cace FindwxWidgets: Include hotfix number
Add it to the wxWidgets_VERSION_STRING when it is not 0.
Include hotfix numbers when searching for installation paths,
for example wxWidgets-3.2.2.1.

Fixes: #24823
2023-11-01 08:20:13 -04:00
Maarten Bent
35d90784e9 FindwxWidgets: use IN_LIST 2023-11-01 08:20:07 -04:00
Rick Budé
34ca0178ae FindwxWidgets: Fix returning optional components
Fixes: #25150
2023-08-02 10:15:02 -04:00
CheesyNacho10
e36e455b7c FindwxWidgets: Add an imported target 2023-03-08 16:39:38 -05:00
Vitaly Stakhovsky
99614e06be Source: Fix a few typos 2023-01-17 08:25:04 -05:00
Maarten Bent
7d6e01801d FindwxWidgets: Do not reset wxWidgets_LIB_DIR unnecessarily
Only reset it when `WX_ROOT_DIR` had a value.  This change allows to set
both `wxWidgets_LIB_DIR` and `wxWidgets_ROOT_DIR` at the same time when
they where previously `-NOTFOUND`.
2022-07-06 09:59:38 -04:00
Maarten Bent
6dce42b171 FindwxWidgets: Restore win32 find style on MinGW
Since commit 6fac8af9ca (FindwxWidgets: set wxWidgets_FIND_STYLE to unix
on MINGW, 2022-04-11, v3.24.0-rc1~296^2), we only tried unix find style
on MinGW.  However, only some MinGW builds have the `wx-config` needed
for unix find style.  Other builds, including those using the official
wxWidgets makefiles, do not provide `wx-config` and need to use win32
find style.  To accommodate both use cases, first use win32 find style
and if it fails, use unix find style.
2022-07-06 09:58:48 -04:00
Maarten Bent
2a19231d61 FindwxWidgets: Support more wxWidgets versions, including 3.2
Update the example to use a more recent wxWidgets version.

Use a list with known version numbers when searching for installation directories and wx-config names.
2022-07-05 14:55:43 -04:00
Maarten Bent
853449429d FindwxWidgets: Use version number from header for library names 2022-07-05 14:55:43 -04:00
Maarten Bent
ed51e0bb75 FindwxWidgets: Move extracting version number to a macro 2022-07-05 14:55:43 -04:00
Mehdi Chinoune
6fac8af9ca FindwxWidgets: set wxWidgets_FIND_STYLE to unix on MINGW
The MinGW variant has wx-config which make it easier to find.
2022-04-11 06:23:50 +01:00
Nikita Nemkin
8fea95319b Help: Add .. versionadded directives to module docs
Issue: #19715
2020-12-02 21:00:30 +05:00
Adriaan de Groot
1fe5abb47f FindwxWidgets: Expand list of names for wx-config
This looks for the FreeBSD-packaging names of wx-config as well.

Fixes: #19372
2020-10-07 10:11:18 -04:00
Tobias Taschner
ada1824dc5 FindwxWidgets: Add support for 3.1.3 on macOS
Previously only -framework was used starting with 3.1.3 -weak_framework
might also be used and has to be handled.
2019-12-10 09:11:14 -05:00
Brad King
a5bb08a8c0 FindwxWidgets: Fix finding both release and debug libs
In commit fe54989fcd (FindwxWidgets: Add support for wxQt, 2019-11-12,
v3.16.0-rc4~12^2~1) the internal `WX_FIND_LIBS` macro gained an argument
but not all call sites were updated.  Update the missing one now.

Fixes: #20005
2019-11-22 11:03:33 -05:00
Craig Sturdy
84408ff402 FindwxWidgets: Find wxQt debug libraries
Extend the change from commit fe54989fcd (FindwxWidgets: Add support for
wxQt, 2019-11-12, v3.16.0-rc4~12^2~1) to also find debug-enabled libs.
2019-11-20 10:06:15 -05:00
Brad King
842605341a Merge topic 'FindwxWidgets-mingw' into release-3.16
c921ec6112 FindwxWidgets: Add link dependencies for MinGW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4040
2019-11-13 09:44:08 -05:00
Grant Kim
c921ec6112 FindwxWidgets: Add link dependencies for MinGW
wxWidgets on MinGW requires system libraries `uuid` and `uxtheme`.
2019-11-13 09:42:50 -05:00
Brad King
a0212382c9 Merge topic 'FindwxWidgets-qt' into release-3.16
fe54989fcd FindwxWidgets: Add support for wxQt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4038
2019-11-13 09:38:48 -05:00
Craig Sturdy
fe54989fcd FindwxWidgets: Add support for wxQt 2019-11-12 10:11:07 -05:00
Tomasz Słodkowicz
f805cdd261 FindwxWidgets: Add support for 3.1.3 VS binaries 2019-11-01 10:08:18 -04:00
Kitware Robot
df4ed1e9ff Help: Convert remaining modules to block-style comments 2018-10-22 11:09:34 -04:00
Tomasz Słodkowicz
045b0beae1 FindwxWidgets: implement detailed components status on Windows 2018-10-10 08:45:56 +02:00
Tomasz Słodkowicz
0813581859 FindwxWidgets: honor OPTIONAL_COMPONENTS 2018-10-04 23:52:30 +02:00
Andrea Ranieri
9174786008 FindwxWidgets: Use more private name for local variable
Avoid using a `_filename` variable that may be set by project code.
Also unset the variable name that we do use to avoid conflict.
2018-04-11 10:41:10 -04:00
Brad King
d7af8a34b6 Merge topic 'findwxwidgets-msys-library-dirs'
44ad8e48de FindwxWidgets: Fix wxWidgets_LIBRARY_DIRS on Cygwin/MSYS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1930
2018-04-05 13:28:19 -04:00
Arkady Shapkin
45bf6f6246 Modules: Use MSVC_TOOLSET_VERSION variable to simplify logic 2018-04-04 13:21:16 -04:00
ARATA Mizuki
44ad8e48de FindwxWidgets: Fix wxWidgets_LIBRARY_DIRS on Cygwin/MSYS
The check for `wxWidgets_LIBRARIES` variable, introduced by e8b77084, fails
with the `wx-config` script generated by an MSYS build, because
`wxWidgets_LIBRARY_DIRS` is in POSIX style.

This commit fixes the problem with `wxWidgets_LIBRARY_DIRS` by converting it to
Windows style.  The actual code were copied from bf643286, which does the same
thing for `wxWidgets_INCLUDE_DIRS`.
2018-04-05 01:37:57 +09:00
Adam Oleksy
73738f620f FindwxWidgets: Add support for MSVC versions of the v141 toolset
Since commit v3.8.0-rc3~7^2 (FindwxWidgets: Add support for VS 2017 v141
toolset, 2017-03-22) more MSVC updates have been released that use a
MSVC_VERSION value higher than 1910.  Revise our checks accordingly.

Issue: #16735
2018-03-19 11:56:00 -04:00
Raffi Enficiaud
67db3ff958 Fix eating "-L" in path names
When the path containing the wxLibraries contains a "-L", a "string(REPLACE "-L" ...)
replaces the content and results in a wrong path. The regex fixes this.
2018-02-17 16:15:57 +01:00
Christian Pfeiffer
9b503cc86e wxWidgets: Respect WX_CONFIG and WXRC_CMD env vars
Issue: #17492
2017-11-19 23:05:31 +01:00
luzpaz
777e87ae00 Fix trivial typos in text
Some are user facing.

Found using

    codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt`

whereby the whitelist contained:

    ans
    dum
    helpfull
    emmited
    emmitted
    buil
    iff
    isnt
    nto
    ot
    pathes
    substract
    te
    todays
    upto
    whitespaces
2017-11-03 10:25:05 -04:00
Tomasz Słodkowicz
cf78bf6812 FindwxWidgets: Add support for Windows XP compatible buils
Microsoft has dedicated toolset versions for XP compatible binaries
(v110 vs. v110_xp, v141 vs. v141_xp) and CMake doesn't find wxWidgets
compiled with _xp tools. This patch adds _xp to directories searched
for wxWin libraries.
2017-08-30 10:31:02 -04:00
Thierry Crozat
a7a0bf861a FindwxWidgets: Fix parsing of cxxflags when paths contain -D or -I
Use proper command-line parsing rather than accidentally matching
content in the middle of paths that looks like flags.

Fixes: #16986
2017-06-19 13:56:09 -04:00
Jan Mrázek
e8b77084df FindwxWidgets: Verify existence of libraries reported by wx-config
When the Ubuntu package `libwxgtk3-dev` is not installed, FindwxWidgets
succeeds even the required libraries are not actually found. The reason
for that is that `wx-config` does not perform any kind of check and uses
hard-coded values.  This affects e.g. KiCAD build process and makes it
fail with a confusing error message [1].  The solution is to check for
presence of every library file obtained from `wx-config`.

[1] https://bugs.launchpad.net/kicad/+bug/1630020
2017-04-20 09:15:59 -04:00
Vadim Zeitlin
ae4b3b7072 FindwxWidgets: link with the new required libs under MSW
Latest wxWidgets git master version and the upcoming 3.1.1 release requires
linking with shlwapi and version DLLs. As this does no harm when using the
previous versions, just do it unconditionally.
2017-04-07 23:50:55 +02:00
Brad King
8f207df14d FindwxWidgets: Add support for VS 2017 v141 toolset
Issue: #16735
2017-03-22 11:08:05 -04:00
Brad King
73f7d26682 FindwxWidgets: Use MSVC_VERSION instead of MSVC## 2017-03-22 11:08:05 -04:00
Brad King
52e8fa2312 FindwxWidgets: Fix finding unversioned VS-built directory prefixes
The change in commit v3.7.0-rc1~217^2 (FindwxWidgets: Add VS-versioned
library directory prefixes, 2016-08-24) works only for official
wxWidgets builds that add the VS-versioned directory prefixes.  Local
wxWidgets builds still have an unversioned prefix.  Search them.

Closes: #16366
2016-10-17 11:06:00 -04:00
Brad King
86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Brad King
20d7da5276 FindwxWidgets: Add VS-versioned library directory prefixes
Add Visual Studio version number (supported: VS2008 to VS2015) to
WX_LIB_DIR_PREFIX (old: vc / vc_x64; new: vc120 / vc120_x64).

Patch-by: Hannes Grobler (Johnny_xy on gitlab.kitware.com)
2016-08-25 11:26:34 -04:00
Brad King
4ef8a205ed FindwxWidgets: Add version 3.1.0
Patch-by: Hannes Grobler (Johnny_xy on gitlab.kitware.com)
2016-08-25 11:25:38 -04:00
Daniel Pfeifer
5d0d980d99 Use string(APPEND) in Modules
Automate with:

find Modules -type f -print0 | xargs -0 perl -i -0pe \
's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
2016-07-28 00:41:13 +02:00
Wayne Stambaugh
bf643286d3 FindwxWidgets: Resolve Cygwin/MSYS paths to Windows paths
We use `sh wx-config` to launch the `wx-config` tool so that it can run
even on Windows.  Since it is always a shell script its output may use
POSIX paths even on Windows.  Use `cygpath` to convert to Windows paths.
2016-02-17 08:52:56 -05:00