Commit Graph

66 Commits

Author SHA1 Message Date
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
Jason Erb d0711486f9 FindwxWidgets: Add webview library (#12636)
Update for wxWidgets 2.9.3 to include webview component.
2011-12-22 09:29:59 -05:00
Brad King c4275592a8 Modules: Include builtin FindPackageHandleStandardArgs directly
The FindPackageHandleStandardArgs module was originally created outside
of CMake.  It was added for CMake 2.6.0 by commit e118a627 (add a macro
FIND_PACKAGE_HANDLE_STANDARD_ARGS..., 2007-07-18).  However, it also
proliferated into a number of other projects that at the time required
only CMake 2.4 and thus could not depend on CMake to provide the module.
CMake's own find modules started using the module in commit b5f656e0
(use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS in some of the FindXXX
modules..., 2007-07-18).

Then commit d358cf5c (add 2nd, more powerful mode to
find_package_handle_standard_args, 2010-07-29) added a new feature to
the interface of the module that was fully optional and backward
compatible with all existing users of the module.  Later commit 5f183caa
(FindZLIB: use the FPHSA version mode, 2010-08-04) and others shortly
thereafter started using the new interface in CMake's own find modules.
This change was also backward compatible because it was only an
implementation detail within each module.

Unforutnately these changes introduced a problem for projects that still
have an old copy of FindPackageHandleStandardArgs in CMAKE_MODULE_PATH.
When any such project uses one of CMake's builtin find modules the line

  include(FindPackageHandleStandardArgs)

loads the copy from the project which does not have the new interface!
Then the including find module tries to use the new interface with the
old module and fails.

Whether this breakage can be considered a backward incompatible change
in CMake is debatable.  The situation is analagous to copying a standard
library header from one version of a compiler into a project and then
observing problems when the next version of the compiler reports errors
in its other headers that depend on its new version of the original
header.  Nevertheless it is a change to CMake that causes problems for
projects that worked with previous versions.

This problem was discovered during the 2.8.3 release candidate cycle.
It is an instance of a more general problem with projects that provide
their own versions of CMake modules when other CMake modules depend on
them.  At the time we resolved this instance of the problem with commit
b0118402 (Use absolute path to FindPackageHandleStandardArgs.cmake
everywhere, 2010-09-28) for the 2.8.3 release.

In order to address the more general problem we introduced policy
CMP0017 in commit db44848f (Prefer files from CMAKE_ROOT when including
from CMAKE_ROOT, 2010-11-17).  That change was followed by commit
ce28737c (Remove usage of CMAKE_CURRENT_LIST_DIR now that we have
CMP0017, 2010-12-20) which reverted the original workaround in favor of
using the policy.  However, existing project releases do not set the
policy behavior to NEW and therefore still exhibit the problem.

We introduced in commit a364daf1 (Allow users to specify defaults for
unset policies, 2011-01-03) an option for users to build existing
projects by adding -DCMAKE_POLICY_DEFAULT_CMP0017=NEW to the command
line.  Unfortunately this solution still does not allow such projects to
build out of the box, and there is no good way to suggest the use of the
new option.

The only remaining solution to keep existing projects that exhibit this
problem building is to restore the change originally made in commit
b0118402 (Use absolute path to FindPackageHandleStandardArgs.cmake
everywhere, 2010-09-28).  This also avoids policy CMP0017 warnings for
this particular instance of the problem the policy addresses.
2011-01-20 10:56:49 -05:00
Alex Neundorf ce28737c93 Remove usage of CMAKE_CURRENT_LIST_DIR now that we have CMP0017
This puts the new search behaviour for included files in action, i.e.
now when a file from Modules/ include()s another file, it also gets the
one from Modules/ included, i.e. the one it expects.

Alex
2011-01-04 08:20:08 -05:00
Alex Neundorf b01184022b Use absolute path to FindPackageHandleStandardArgs.cmake everywhere
This is to avoid getting an (older) copy of FPHSA.cmake which is
e.g. installed with KDE 4.5.0 and 4.5.1.

Alex
2010-09-28 22:30:31 +02:00
Miguel A. Figueroa-Villanueva ede24f8171 ENH #8993: FindwxWidgets add support for wx-config custom options.
Added suport for setting a custom toolkit, refix, etc. when using
wx-config.
2010-09-05 09:39:37 -04:00
Miguel A. Figueroa-Villanueva 3dbeeb7793 BUG #8184: Fixed FindwxWidgets wrong order of default libs for MinGW.
Also fixed usage sample in comments, which can be misleading for MinGW
users as demonstrated by mantis issue #10089.
2010-09-01 12:27:31 -04:00
Miguel A. Figueroa-Villanueva f46712ebe7 BUG #11123: Generic include dir should come after config specific one. 2010-09-01 10:40:01 -04:00
Miguel A. Figueroa-Villanueva 36c15a2f0b BUG #10658: FindwxWidgets USE_FILE should not include .cmake extension.
The wxWidgets_USE_FILE variable to be used with the include command
should be set to UsewxWidgets; not UsewxWidgets.cmake.
2010-09-01 00:15:07 -04:00
Miguel A. Figueroa-Villanueva f51eb9cb0c BUG: #9775 Fixed patch FindwxWidgets-fixed-bug-9775.
Forgot to add new libraries in list of libs to be cleared.
2010-08-30 19:38:45 -04:00
Miguel A. Figueroa-Villanueva 6bbf2a0e8e ENH: #9775 Added support for new wxWidgets 2.9 libraries.
Added support for new libraries in wxWidgets 2.9 that are
part of the main distribution. These are: wxPropertyGrid,
wxSTC, wxScintilla, and wxRibbon.
2010-08-29 12:22:18 -04:00
Todd Gamblin 2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Kai Wasserbäch 9203e9187e Fix spelling errors reported by Lintian.
During a Lintian run on the binary packages of CMake in Debian I was
notified of many spelling mistakes.
2010-07-13 09:41:37 -04:00
Miguel A. Figueroa-Villanueva 601ee1f735 BUG #10209: Fixed FindwxWidget CXX flags parsing error.
Was not removing definition flags (-D...) from cxx flags,
when the definition flag was last in the list returned from
wx-config.

--HG--
extra : rebase_source : 3452c52b92717f181e902abef38c1e2718ce3b27
2010-05-09 13:27:58 -04:00
Miguel A. Figueroa-Villanueva 8f9f6b3ac1 BUG #9419: Added wxWidgets_EXCLUDE_COMMON_LIBRARIES option.
This allows the user not to link to the common libraries,
which are regularly required. The user must specify all
libraries that he does want to link in the find_package
line (png tiff jpeg zlib regex expat).

--HG--
extra : rebase_source : df29f96c957600629a34a1c5fafb8b3d6f274e22
2010-03-07 05:50:49 -04:00
Brad King c4bb9c9d42 Convert CMake find-modules to BSD License
This adds copyright/license notification blocks CMake's find-modules.
Many of the modules had no notices at all.  Some had notices referring
to the BSD license already.  This commit normalizes existing notices and
adds missing notices.
2009-09-28 11:45:50 -04:00
Alexander Neundorf 879f2f98fe STYLE: fix typos in the docs
Alex
2009-04-19 12:47:01 -04:00
Miguel A. Figueroa-Villanueva 3dce55fde0 BUG: Fix copy/paste error in previous commit that references wrong variable
(wxWidgets_INCLUDE_DIRS instead of wxWidgets_DEFINITIONS).
2009-02-25 17:17:34 -05:00
Miguel A. Figueroa-Villanueva cf55e01ada BUG: Using PROPERTY COMPILE_DEFINITIONS_DEBUG to support Debug only preprocessor options (e.g., _DEBUG __WXDEBUG__). 2009-02-24 16:49:15 -05:00
Miguel A. Figueroa-Villanueva 1e5d400100 BUG: Fixed placement of initial wxWidgets_FOUND=TRUE statement, which allowed
some cases to breakaway from tests without resetting to FALSE (BUG: 8188).
2008-12-24 04:31:33 -05:00
Miguel A. Figueroa-Villanueva 0325639f30 BUG: Fix to find wxWidgets_LIB_DIR for windows platform more generally;
supports gcc, nmake, and visual studio in all configurations.
2008-10-20 11:50:04 -04:00
Miguel A. Figueroa-Villanueva a003ac39d3 BUG: Added unicode paths for wxWidgets_LIB_DIR search and the 2.8.9 suffix for wxWidgets_ROOT_DIR search. 2008-10-19 21:14:55 -04:00
Miguel A. Figueroa-Villanueva 8adb6b9be2 ENH: Improved support for finding wxWidgets in MinGW environment. 2008-07-13 18:06:22 -04:00
Miguel A. Figueroa-Villanueva 5aa8ec2067 BUG: Add new library richtext. Reported in #7284 thanks to earith. 2008-07-06 04:57:40 -04:00
Miguel A. Figueroa-Villanueva 6eddfbdd91 ENH: Added support for MSYS as a unix style search. 2008-06-17 18:02:24 -04:00
Miguel A. Figueroa-Villanueva 6c97713a27 BUG: Fix so that MinGW use win32_find_style (6478). Also, consolidated search styles selection into a single variable, so that they are mutually exclusive. 2008-06-16 14:15:52 -04:00
Miguel A. Figueroa-Villanueva 973b03994a BUG: Fixed incorrectly matched FOREACH (7008). 2008-06-13 16:33:29 -04:00
David Cole 052b82c382 BUG: There are compiler problems with wxWidgets and INCLUDE_DIRECTORIES(SYSTEM ...) use on the Mac. Set variable wxWidgets_INCLUDE_DIRS_NO_SYSTEM on the Mac in FindwxWidgets.cmake to avoid these problems. 2008-04-16 11:31:13 -04:00
Alexander Neundorf fc8ce17433 ENH: remove RAISE_SCOPE() again and instead add SET(<var> <value> PARENT_SCOPE)
Alex
2008-01-18 15:52:54 -05:00
Miguel A. Figueroa-Villanueva 4c6dcc0ed9 BUG: Support cross-compiling; wx-config should be searched for in target platform ONLY (bug 6187). 2008-01-05 20:37:51 -05:00