Commit Graph

95 Commits

Author SHA1 Message Date
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
Brad King
4d05f195d9 FindwxWidgets: Drop suppression of -isystem
This was added by commit v2.8.0~2292 (... Set variable
wxWidgets_INCLUDE_DIRS_NO_SYSTEM on the Mac ..., 2008-04-16) and updated
by commit v2.8.9~183^2 (FindwxWidgets: Do not use -isystem on OpenBSD,
2012-05-14).  Since the underlying cause was never investigated fully we
do not know the conditions under which -isystem breaks wxWidgets, but
suppressing -isystem is problematic for users that do not want to see
warnings in wxWidgets headers.  Simply drop the special case for now so
we can see whether anyone hits the problem again, at which point it can
be investigated in more detail.

Reported-by: Simon Wells <swel024@gmail.com>
2016-01-11 16:26:24 -05:00
Brad King
da7276cf94 Replace http://www.cmake.org URLs with https://cmake.org
The latter is now the preferred URL for visiting cmake.org with a
browser.  Convert using the shell code:

 git ls-files -z | xargs -0 sed -i 's|http://www\.cmake|https://cmake|g'
2015-09-25 15:47:39 -04:00
Simon Richter
15aacb684a FindwxWidgets: Add wxWidgets webview component 2015-09-09 10:20:23 -04:00
Simon Richter
8122fbd0f5 FindwxWidgets: Expect wxWidgets 3.1 2015-09-09 10:20:18 -04:00
Simon Richter
6089fde554 FindwxWidgets: allow specifying required version 2015-09-09 10:20:08 -04:00
Brad King
2c96974315 FindwxWidgets: Fix find_program call for versioned names
In commit v3.3.0-rc1~132^2 (FindwxWidgets: Search for wx-config-3.0 in
addition to wx-config, 2015-04-29) we added a second (versioned) name to
the find_program call.  Specifying multiple names requires use of the
NAMES option.  Add it now.  While at it, also add versioned names for
2.9 and 2.8.
2015-06-08 09:13:29 -04:00
Orion Poplawski
1b04561edb FindwxWidgets: Search for wx-config-3.0 in addition to wx-config (#15540)
The Fedora package installs 'wx-config' as 'wx-config-3.0' so look
for the latter name too.
2015-04-29 12:51:07 -04:00
Christopher Gittner
75dee2f2c2 FindwxWidgets: Add versions 3.0.1 and 3.0.2 2014-11-26 10:15:53 -05:00
Richard M. Shaw
3328623504 FindwxWidgets: Improve path detection logic when cross-compiling. 2014-08-22 12:20:42 -05:00
Rolf Eike Beer
b0b4b4602f Remove .* expressions from beginning and end of MATCHES regexs
All these expressions work the same:
  "foo"
  ".*foo.*"
  "^.*foo.*$"

This assumes that the "Intel*" expressions were meant to be "Intel.*".
2014-04-14 18:17:11 +02:00
Arnaud Desmier
2cd559789b FindwxWidgets: Add support for wxWidgets 3.0.0 (#14587)
Add the "wxWidgets-3.0.0" path suffix and the "30" library names.
While at it, add the "wxWidgets-2.9.5" suffix too.
2013-11-20 10:51:55 -05:00
Kitware Robot
f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00
Marius Luca
870f91e389 FindwxWidgets: Look in x64 directories for MSVC (#14393)
When compiling the 64 bit version of wxWidgets using nmake the library
folders become vc_x64_lib and vc_x64_dll and can coexist with the win32
version.
2013-09-10 08:41:13 -04:00
Andreas Mohr
5ca4336ece FindwxWidgets: add DOC strings with usual style 2013-05-07 08:42:20 -04:00
Rolf Eike Beer
b04650e163 use the find_* functions ENV parameter
Instead of directly passing $ENV{SOMEVAR} to a find_* call pass in ENV SOMEVAR.
This will make sure the paths will get correctly handled through different
platforms, especially on Windows.

Also fixes one place where paths with windows delimiters (\) were hardcoded to
use forward slashes.
2012-08-14 21:02:58 +02:00
Kitware Robot
9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot
77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot
7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
Anthony J. Bentley
16ee19731e FindwxWidgets: Do not use -isystem on OpenBSD (#13219)
Set wxWidgets_INCLUDE_DIRS_NO_SYSTEM on OpenBSD in addition to Apple to
prevent UsewxWidgets.cmake from using the include_directories SYSTEM
option.
2012-05-14 16:01:35 -04:00