summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/WindowsPaths.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Simplify CMake per-source license noticesBrad King2016-09-271-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Windows: Find Program Files directories more robustly from environmentBrad King2016-01-151-33/+19
| | | | | | | | | | | In Modules/Platform/WindowsPaths.cmake our previously recorded environment variable combinations no longer seem to be correct. For example, a 64-bit cmake binary may see ProgramW6432 in the environment and end up not considering the "ProgramFiles(x86)" variable. Instead check for all possible environment variables in the preferred order and then remove duplicates. Reported-by: Shawn Waldon <shawn.waldon@kitware.com>
* Windows: Avoid () in environment variable referencesBen Boeckel2014-05-081-2/+3
| | | | Use nested variable evaluation instead.
* Introduce CMAKE_STAGING_PREFIX variable.Stephen Kelly2013-11-211-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | This variable can be useful in cross-compiling contexts where the sysroot is read-only or where the sysroot should otherwise remain pristine. If the new CMAKE_STAGING_PREFIX variable is set, it is used instead of CMAKE_INSTALL_PREFIX when generating the installation rules in cmake_install.cmake. This way, the CMAKE_INSTALL_PREFIX variable always refers to the installation prefix on the target device, regardless of whether host==target. If any -rpath paths passed to the linker contain the CMAKE_STAGING_PREFIX, the matching path fragments are replaced with the CMAKE_INSTALL_PREFIX. Matching paths in the -rpath-link are not transformed. The cross-prefix usr-move workaround is assumed not to require extension regarding CMAKE_STAGING_PREFIX. The staging area is a single prefix, so there is no scope for cross-prefix symlinks. The CMAKE_INSTALL_PREFIX is still used to determine the workaround path, and that variable remains the relevant one even if CMAKE_STAGING_PREFIX is used. If the generated export files are deployed to the target, the workaround will still be in place, and still be employed if required.
* Allow disabling adding the install prefix to the prefix search path.Stephen Kelly2013-10-311-6/+12
| | | | | | | In certain scenarios, it is preferable to keep a 'dirty' install prefix than to clear it, and to expect that content will not be found there. Add a CMAKE_FIND_NO_INSTALL_PREFIX variable that can be set to disable searching the install prefix.
* Windows: Search '/' prefix only when cross compiling (#10994)Brad King2013-04-251-2/+4
| | | | | | | | | | | | | | | | | | | | | Commit dac78148 (...makes the mingw cross compiler work out of the box..., 2007-08-02) added to CMAKE_SYSTEM_PROGRAM_PATH and CMAKE_SYSTEM_LIBRARY_PATH paths like "/bin" and "/lib" with no Windows drive letter so that cross-compiling to Windows from Linux would search these paths under CMAKE_FIND_ROOT_PATH. Later commit 2a782880 (...use CMAKE_SYSTEM_PREFIX_PATH when possible, 2008-01-16) generalized this approach by instead adding "/" to CMAKE_SYSTEM_PREFIX_PATH. Both commits assumed that the paths would never match anything on Windows hosts without a drive letter. However, Windows evaluates these paths relative to the current working drive letter so find_* commands may report paths like "/lib/..." when paths like "c:/lib/..." exist on what happens to be current drive. Such drive-less paths are not reliable when the working drive changes, so we should not use them. Fix WindowsPaths.cmake to add '/' to CMAKE_SYSTEM_PREFIX_PATH only when cross-compiling to Windows from a non-Windows host. This will avoid searching and finding local paths without a drive letter on Windows.
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-28/+28
| | | | | | | | | | | | | | | | | 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
* Modules: Fix spelling 'To distributed' -> 'To distribute'Todd Gamblin2010-08-091-1/+1
|
* Avoid (Unix|Windows)Paths.cmake multiple includeBrad King2009-10-051-0/+10
| | | | | | | | | | Block multiple inclusion because "Modules/CMakeCInformation.cmake" includes "Platform/${CMAKE_SYSTEM_NAME}" even though the generic module "CMakeSystemSpecificInformation.cmake" already included it. The extra inclusion is a work-around to address issue #4772 without intrusive platform file changes. Once those changes are made the work-around and these include blockers can be removed. See issue #9656.
* Add copyright notice to (Unix|Windows)Paths.cmakeBrad King2009-10-051-0/+14
| | | | | This commit adds our copyright notice to these non-trivial platform modules.
* ENH: Use 32-bit and 64-bit Program Files foldersBrad King2008-12-171-8/+49
| | | | | | On 64-bit Windows there may be two Program Files folders, one for 32-bit binaries and one for 64-bit binaries. When we compute CMAKE_SYSTEM_PREFIX_PATH we should put both folders in the path.
* ENH: Convert Modules/Platform specification of system search paths to use ↵Brad King2008-01-161-11/+25
| | | | CMAKE_SYSTEM_PREFIX_PATH when possible.
* ENH: use WindowsPaths.cmake on all Windows platforms, not only for cl, makesAlexander Neundorf2007-08-021-3/+9
| | | | | | | the mingw cross compiler work out of the box and should help mingw users on windows with a common install dir Alex
* ENH:Alexander Neundorf2007-07-271-3/+3
| | | | | | | | -add /usr/openwin/include and /usr/openwin/lib to the default search paths -add /${CMAKE_INSTALL_PREFIX}/(lib|bin|include) to the default cmake search paths -> this should help users who install stuff in their home Alex
* ENH: also look in the include/, lib/ and bin/ directories in the cmakeAlexander Neundorf2007-07-171-3/+11
| | | | | | | install dir under windows, this will help e.g. people using kdewininstaller and similar setups Alex
* ENH: check in new find stuffBill Hoffman2006-03-021-0/+3