Commit Graph

50 Commits

Author SHA1 Message Date
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
Miguel A. Figueroa-Villanueva d1f2e3ff97 ENH: Generalized the WXWIDGETS_ADD_RESOURCES to support header generation, xrs file generation, and other options (BUG: 6162). 2008-01-05 11:19:29 -05:00
Miguel A. Figueroa-Villanueva bfeeb88b1f STYLE: Refactored common libs into a variable, modified comments, and cleaned use of monolithic build. 2007-12-22 10:15:04 -05:00
Miguel A. Figueroa-Villanueva 93f079ecae STYLE: Clarified usage documentation for cmake --help-module FindwxWidgets. 2007-12-02 09:15:40 -05:00
Miguel A. Figueroa-Villanueva 51fce4d391 STYLE: Use LIST(APPEND ...) instead of SET(...) 2007-12-01 22:51:25 -05:00
Miguel A. Figueroa-Villanueva 895a2384fa ENH: Added search entry for the new release: wxWidgets-2.8.7. 2007-12-01 20:58:13 -05:00
Miguel A. Figueroa-Villanueva 01dd9bc160 ENH: Added support for selecting different configurations in UNIX_STYLE: debug/release, static/shared, unicode/ansi, and regular/universal. 2007-12-01 20:35:58 -05:00
Miguel A. Figueroa-Villanueva 4cee09fd4c ENH: Added macro support for compiling xrc resources to cpp code. 2007-12-01 19:30:11 -05:00
Miguel A. Figueroa-Villanueva d22df5bef4 BUG: Fix to support arch and isysroot compilation options on MAC (Bug 5007). 2007-11-12 13:52:45 -05:00
Miguel A. Figueroa-Villanueva aa51ca2512 BUG: Fixed error related to missing quotes around variable. 2007-11-04 01:20:22 -04:00
Miguel A. Figueroa-Villanueva 97e5b7e01f ENH: Added support for finding wxWidgets-2.9. Thanks to Joshua Jensen and Steven. 2007-10-17 09:38:30 -04:00
Miguel A. Figueroa-Villanueva 1c1cde697b BUG: Added support for the AUI library module (bug 4338). Also applied some
STYLE changes including: deprecation of wxWidgets_USE_LIBS in favor of using
standard FIND_PACKAGE COMPONENTS, removed some CMake 2.4.2 compatibility patches,
use of execute_process instead of exec_program, etc.
2007-10-12 21:30:24 -04:00
Brad King 2fd1b374c1 ENH: Patch from Jan for bug#3453. Cleans up find script and enables -isystem feature for use script. 2006-10-19 10:07:41 -04:00
Brad King ff46146dfc BUG: Patch from Peter Visser to run wx-config from an MSYS prompt. 2006-09-13 11:22:27 -04:00
Brad King 3c9744f406 ENH: Applying patch from bug#3443 to implement FindwxWidgets.cmake properly. It also updates the UseWX test and WXDialog sources to use the new find script. 2006-07-21 15:43:19 -04:00
Andy Cedilnik ad4f98f3cf ENH: Cleanup. Use relative path to modules 2004-08-26 22:52:53 -04:00
Bill Hoffman ef5387a8ff BUG: fix for bug 618 2004-04-22 17:23:48 -04:00