Commit Graph

29 Commits

Author SHA1 Message Date
Vitaly Lipatov
c18ed7236d GNUInstallDirs: Warn when CMAKE_SYSTEM_NAME is not set
If a project writes `include(GNUInstallDirs)` before `project()` then
`CMAKE_SYSTEM_NAME` may not be set and an incorrect `LIBDIR` may be
computed.  Warn about this case.
2020-01-30 09:14:47 -05:00
Antonio Rojas
18365587c8 GNUInstallDirs: Keep 'lib' as default LIBDIR on Arch Linux based systems
Fixes: #15373
2019-08-26 11:14:13 -04:00
Tobias C. Berner
f835f189ae GNUInstallDirs: Update FreeBSD "info" destination to share/info
FreeBSD ports commit r484628 (Install texinfo files (GNU info) into
${PREFIX}/share/info, 2018-11-10) changed the "info" destination
from "info" to "share/info".  The commit included a patch to their
distribution of CMake to fix the `GNUInstallDirs` module too.
Apply a similar logic change to our upstream version of the module.

We already made a similar change for GNU/kFreeBSD in commit
v3.13.0-rc2~8^2 (GNUInstallDirs: Don't use BSD info and man paths on
GNU/kFreeBSD, 2018-10-21).

Fixes: #18585
2018-11-13 13:35:50 -05:00
Brad King
4c0d97dd98 GNUInstallDirs: Split "info" and "man" default logic
The conditions may soon differ.
2018-11-13 13:35:35 -05:00
Brad King
afd928f85a Merge topic 'rst-block-comments'
75f73dde0f Utilities/Scripts: Remove temporary block-style comment conversion script
df4ed1e9ff Help: Convert remaining modules to block-style comments
7115aa6c22 Utilities/Scripts: Add temporary block-style comment conversion script

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2510
2018-10-23 10:24:09 -04:00
James Clarke
b2d7ab8bd1 GNUInstallDirs: Don't use BSD info and man paths on GNU/kFreeBSD 2018-10-22 12:58:54 -04:00
Kitware Robot
df4ed1e9ff Help: Convert remaining modules to block-style comments 2018-10-22 11:09:34 -04:00
Brad King
24e2bc4219 GNUInstallDirs: Update link to 64-bit ABI documents
Suggested-by: Chris Coutinho <chrisbcoutinho@gmail.com>
Fixes: #17503
2017-11-27 10:01:35 -05:00
Christian Pfeiffer
a8be8b1b54 GNUInstallDirs: Enable CMP0054
Fixes: #17381
2017-10-23 09:02:54 -04:00
Felix Geyer
40814a7ce9 GNUInstallDirs: Add RUNSTATEDIR variable 2017-04-20 17:25:46 +02:00
Roger Leigh
53b5d6345d GNUInstallDirs: Set UNINITALIZED cache properties to type PATH
Also convert the path to a cmake path
2016-12-12 22:23:26 +00:00
Roger Leigh
c968213d2e GNUInstallDirs: Unify path logic into helper macros
- Unify path handling: Rather than repeat the same logic for each
  individual path create two macros which can be used throughout
  the module.
- Capitalise helpstrings to match the conventions used by the
  standard CMake properties
2016-12-12 22:22:44 +00:00
Brad King
c1f97af640 Merge topic 'simplify-license-notices'
19671831 Help: Update cmake-developer(7) module license docs for new notice
756169ac Tests: Update ModuleNotices test for new notice
845d86bc Utilities/Scripts: Remove temporary script that filtered license notices
86578ecc Simplify CMake per-source license notices
b7180cfe Utilities/Scripts: Add temporary script to filter license notices
7feb4ecc Copyright.txt: Add notice of copyright by contributors
78f77f60 Utilities/KWStyle: Remove unused header check reference file
681e0429 Tests: Fix RunCMake.CTest output match to tolerate line number changes
2016-09-28 08:05:10 -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
Dmitry Marakasov
956054aeca GNUInstallDirs: All *BSDs use ${PREFIX}/{man,info} for man and info pages 2016-09-27 08:33:57 -04:00
Roger Leigh
17a24dc3b9 GNUInstallDirs: Add macro to expose internal logic publicly 2016-09-07 09:40:41 -04:00
Alex Turbov
c8bd37ec68 GNUInstallDirs: Add special cases for certain prefixes
Teach the module to handle SYSCONFDIR and LOCALSTATEDIR properly if
CMAKE_INSTALL_PREFIX is set to `/` or `/usr` -- i.e. as expected by GNU
Coding Standard (i.e. set SYSCONFDIR to `/etc` and `LOCALSTATEDIR` to
`/var`).  Also if CMAKE_INSTALL_PREFIX is set to /opt/pkg, `SYSCONFDIR`
must be set to `/etc/opt/pkg` and `LOCALSTATEDIR` to `/var/opt/pkg`
according to FHS.
2015-06-18 08:59:34 -04:00
Brad King
1199ebf1c5 GNUInstallDirs: Improve documentation formatting
Also consolidate the description of each variable.
2015-06-16 10:33:48 -04:00
Brad King
58b2d760ee Modules: Format documentation to avoid over-long preformatted lines
Convert several preformatted code block literals that enumerate lists of
options or variables to use reST definition lists instead.  Manually
wrap other long lines in code blocks.
2014-10-22 15:52:31 -04:00
David Coppa
33f031295c Fix typo in Modules/GNUInstallDirs.cmake (#15176)
Commit d4fdd9c189 ("GNUInstallDirs: use the
proper default for info and man paths on OpenBSD") introduced a typo.
2014-09-29 18:25:25 +02:00
Rolf Eike Beer
d4fdd9c189 GNUInstallDirs: use the proper default for info and man paths on OpenBSD 2014-05-20 18:14:10 +02:00
Daniele E. Domenichelli
620939e4e6 GNUInstallDirs: Fix CMAKE_INSTALL_LIBDIR on Debian
When not installing in /usr (i.e. /usr/local) on Debian/Ubuntu, the
multiarch path is not in ldconfig path, and therefore libraries cannot
be found, unless the user manually modifies the files in
/etc/ld.so.conf.d, in order to include /usr/local/lib/<arch>.

This patch fixes this issue by using "lib/<arch>" only if the user is
installing the software in /usr, and uses "lib" in all the other cases.
2014-01-15 18:02:21 +01:00
Dimitri John Ledkov
f293d525a1 GNUInstallDirs: Use multiarch on Debian with FreeBSD and HURD kernels 2013-12-19 11:27:30 -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
Alex Neundorf
43f83d2ee5 GNUInstallDirs: add support for Debian multiarch
This patch makes CMAKE_INSTALL_LIBDIR default to the debian
multiarch dir if present, e.g. lib/i386-linux-gnu/

Alex
2011-12-14 19:24:28 +01:00
Eric NOULARD
126c993d03 Fix #11964 Handle lib64 library on Linux
The AMD64 ABI document http://www.x86-64.org/documentation/abi.pdf
does specify that 64bits binary libraries should end up in <prefix>/lib64
and 32bits ones in <prefix>/lib. All but debian based distros do so,
and some like OpenSUSE even enforce the rule when packaging with RPM
and refuse to build the RPM if this is not the case.
After some discussion (see the bug notes) we cannot do that behind
the scene and the current fix supposes that the user shall use
the CMAKE_INSTALL_LIBDIR variables content in its INSTALL rules if
he wants to put the lib in the right place. CMAKE_INSTALL_LIBDIR
shall have the appropriate value depending on the Linux distribution
found and 32/64bitness of the host.
The cross-compiling case (even 32bits compile on a 64bits host)
is not handled.
2011-03-31 14:45:48 -04:00
Brad King
c2bf48ef57 GNUInstallDirs: Propagate DATAROOTDIR changes to dependent defaults 2011-03-23 14:39:05 -04:00
Brad King
11431c67c6 GNUInstallDirs: Simplify and clarify documentation 2011-02-28 15:15:01 -05:00
Nikita Krupen'ko
a262fe0917 Add GNUInstallDirs module to define GNU layout (#3976)
Provide CMAKE_INSTALL_* variables to help install files according
to the GNU standard layout:

  http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
2011-02-28 15:15:01 -05:00