2011-01-20 04:28:52 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
2017-08-16 02:49:48 +08:00
|
|
|
<!ENTITY cmake-download-http "https://cmake.org/files/v&cmake-major-version;/cmake-&cmake-version;.tar.gz">
|
2011-01-20 04:28:52 +08:00
|
|
|
<!ENTITY cmake-download-ftp " ">
|
2020-05-29 06:51:45 +08:00
|
|
|
<!ENTITY cmake-md5sum "d47f23a9781b68014e77717f8e291bb7">
|
2020-03-22 05:00:58 +08:00
|
|
|
<!ENTITY cmake-size "9.0 MB">
|
2020-05-29 06:51:45 +08:00
|
|
|
<!ENTITY cmake-buildsize "340 MB (add 584 MB for tests)">
|
|
|
|
<!ENTITY cmake-time "3.2 SBU (add 3.4 SBU for tests, both using parallelism=4)">
|
2011-01-20 04:28:52 +08:00
|
|
|
]>
|
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<sect1 id="cmake" xreflabel="CMake-&cmake-version;">
|
2011-01-20 04:28:52 +08:00
|
|
|
<?dbhtml filename="cmake.html"?>
|
|
|
|
|
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
|
|
|
|
|
|
|
<title>CMake-&cmake-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="cmake">
|
|
|
|
<primary sortas="a-CMake">CMake</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title>Introduction to CMake</title>
|
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
2013-02-12 02:51:17 +08:00
|
|
|
The <application>CMake</application> package contains a modern
|
|
|
|
toolset used for generating Makefiles. It is a successor of the
|
2013-01-20 01:34:41 +08:00
|
|
|
auto-generated <command>configure</command> script and aims to
|
2013-02-12 02:51:17 +08:00
|
|
|
be platform- and compiler-independent. A significant user of
|
2013-01-20 01:34:41 +08:00
|
|
|
<application>CMake</application> is <application>KDE</application>
|
|
|
|
since version 4.
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
|
2020-02-16 00:54:30 +08:00
|
|
|
&lfs91_checked;
|
2011-01-20 04:28:52 +08:00
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Download (HTTP): <ulink url="&cmake-download-http;"/>
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Download (FTP): <ulink url="&cmake-download-ftp;"/>
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Download MD5 sum: &cmake-md5sum;
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Download size: &cmake-size;
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Estimated disk space required: &cmake-buildsize;
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Estimated build time: &cmake-time;
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect3">CMake Dependencies</bridgehead>
|
|
|
|
|
2017-11-28 11:17:06 +08:00
|
|
|
<bridgehead renderas="sect4">Required</bridgehead>
|
|
|
|
<para role="required">
|
|
|
|
<xref linkend="libuv"/>
|
|
|
|
</para>
|
|
|
|
|
2013-08-15 21:47:13 +08:00
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
|
|
<para role="recommended">
|
2014-04-29 05:13:36 +08:00
|
|
|
<xref linkend="curl"/> and
|
2015-07-25 07:55:27 +08:00
|
|
|
<xref linkend="libarchive"/>
|
2011-11-01 03:38:44 +08:00
|
|
|
</para>
|
|
|
|
|
2012-04-09 20:50:25 +08:00
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
2011-11-01 03:38:44 +08:00
|
|
|
<para role="optional">
|
2016-06-05 08:46:57 +08:00
|
|
|
<xref linkend="qt5"/> (for the Qt-based GUI),
|
2020-01-24 10:17:29 +08:00
|
|
|
<xref linkend="subversion"/> (for testing), and
|
|
|
|
<ulink url="https://pypi.python.org/pypi/Sphinx">Sphinx</ulink> (for building documents)
|
2011-01-20 04:28:52 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para condition="html" role="usernotes">User Notes:
|
2013-01-20 01:34:41 +08:00
|
|
|
<ulink url="&blfs-wiki;/cmake"/>
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of CMake</title>
|
2017-04-15 09:13:42 +08:00
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Install <application>CMake</application> by running the following
|
|
|
|
commands:
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
|
2017-11-28 11:17:06 +08:00
|
|
|
<screen><userinput>sed -i '/"lib64"/s/64//' Modules/GNUInstallDirs.cmake &&
|
2016-11-17 03:58:24 +08:00
|
|
|
|
2017-04-15 09:13:42 +08:00
|
|
|
./bootstrap --prefix=/usr \
|
|
|
|
--system-libs \
|
|
|
|
--mandir=/share/man \
|
|
|
|
--no-system-jsoncpp \
|
|
|
|
--no-system-librhash \
|
2015-02-07 23:18:18 +08:00
|
|
|
--docdir=/share/doc/cmake-&cmake-version; &&
|
2011-01-20 04:28:52 +08:00
|
|
|
make</userinput></screen>
|
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
2015-11-18 13:29:40 +08:00
|
|
|
To test the results, issue: <command>bin/ctest
|
|
|
|
-j<replaceable><N></replaceable> -O
|
|
|
|
cmake-&cmake-version;-test.log</command>, where
|
2015-02-07 23:18:18 +08:00
|
|
|
<replaceable><N></replaceable> is an integer between 1 and the
|
2019-06-01 16:14:29 +08:00
|
|
|
number of system cores. In case the environment variable
|
|
|
|
<literal>LANG</literal> is set to a non-blank value and failures
|
|
|
|
occur, try running the tests without having <literal>LANG</literal> set.
|
2015-11-19 06:27:48 +08:00
|
|
|
|
2015-11-18 13:29:40 +08:00
|
|
|
<!-- Please, don't remove this comment, needed if tests start to fail
|
2014-09-24 06:52:35 +08:00
|
|
|
again. If you want to investigate a problem with a given "problem1-test",
|
|
|
|
use <command>bin/ctest -R "problem1-test"</command> and, to omit it, use
|
2014-06-11 08:03:28 +08:00
|
|
|
<command>bin/ctest -E "problem1-test"</command>. These options can be
|
2014-09-24 06:52:35 +08:00
|
|
|
used together: <command>bin/ctest -R "problem1-test" -E
|
|
|
|
"problem2-test"</command>. Option -N can be used to display all
|
|
|
|
available tests, and you can run <command>bin/ctest</command> for a
|
|
|
|
sub-set of tests by using separated by spaces names or numbers as
|
|
|
|
options. Option -/-help can be used to show all options.-->
|
2013-01-20 01:34:41 +08:00
|
|
|
</para>
|
2011-11-01 03:38:44 +08:00
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
|
|
|
|
<screen role="root"><userinput>make install</userinput></screen>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
|
|
|
|
2016-12-20 05:36:08 +08:00
|
|
|
<para>
|
2017-01-16 01:34:58 +08:00
|
|
|
<command>sed ... Modules/GNUInstallDirs.cmake</command>:
|
2016-12-20 05:36:08 +08:00
|
|
|
This command disables applications using cmake from attempting to
|
2017-01-16 01:34:58 +08:00
|
|
|
install files in /usr/lib64/.
|
2016-12-20 05:36:08 +08:00
|
|
|
</para>
|
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
2013-10-11 18:43:06 +08:00
|
|
|
<parameter>--system-libs</parameter>: This switch forces the build system
|
|
|
|
to link against <application>Zlib</application>,
|
|
|
|
<application>Bzip2</application>, <application>cURL</application>,
|
|
|
|
<application>Expat</application> and <application>libarchive</application>
|
|
|
|
installed on the system.
|
2013-01-20 01:34:41 +08:00
|
|
|
</para>
|
2013-02-12 02:51:17 +08:00
|
|
|
|
2015-03-14 16:47:03 +08:00
|
|
|
<para>
|
|
|
|
<parameter>--no-system-jsoncpp</parameter>: This switch removes the
|
|
|
|
<application>JSON-C++</application> library from the list of system
|
|
|
|
libraries. A bundled version of that library is used instead.
|
|
|
|
</para>
|
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
<option>--qt-gui</option>: This switch enables building of the
|
|
|
|
<application>Qt</application>-based GUI for
|
|
|
|
<application>CMake</application>.
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
2011-01-21 22:12:30 +08:00
|
|
|
<segtitle>Installed Programs</segtitle>
|
2013-01-26 00:32:25 +08:00
|
|
|
<segtitle>Installed Libraries</segtitle>
|
2011-01-21 22:12:30 +08:00
|
|
|
<segtitle>Installed Directories</segtitle>
|
2011-01-20 04:28:52 +08:00
|
|
|
|
|
|
|
<seglistitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<seg>
|
2017-11-09 18:48:19 +08:00
|
|
|
ccmake, cmake, cmake-gui (optional), cpack, and ctest
|
2013-01-20 01:34:41 +08:00
|
|
|
</seg>
|
2013-01-26 00:32:25 +08:00
|
|
|
<seg>
|
|
|
|
None
|
|
|
|
</seg>
|
2013-01-20 01:34:41 +08:00
|
|
|
<seg>
|
|
|
|
/usr/share/cmake-&cmake-major-version; and
|
|
|
|
/usr/share/doc/cmake-&cmake-version;
|
|
|
|
</seg>
|
2011-01-20 04:28:52 +08:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
2013-02-12 02:51:17 +08:00
|
|
|
|
2011-01-20 04:28:52 +08:00
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="ccmake">
|
|
|
|
<term><command>ccmake</command></term>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
is a curses based interactive frontend to
|
|
|
|
<command>cmake</command>.
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
<indexterm zone="cmake ccmake">
|
|
|
|
<primary sortas="b-ccmake">ccmake</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<varlistentry id="cmake-prog">
|
2011-01-20 04:28:52 +08:00
|
|
|
<term><command>cmake</command></term>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
is the makefile generator.
|
|
|
|
</para>
|
|
|
|
<indexterm zone="cmake cmake-prog">
|
2011-01-20 04:28:52 +08:00
|
|
|
<primary sortas="b-cmake">cmake</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2013-02-12 02:51:17 +08:00
|
|
|
|
2012-04-09 20:50:25 +08:00
|
|
|
<varlistentry id="cmake-gui">
|
|
|
|
<term><command>cmake-gui</command></term>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
2014-01-23 09:39:32 +08:00
|
|
|
(optional) is the <application>Qt</application>-based frontent to
|
2013-01-20 01:34:41 +08:00
|
|
|
<command>cmake</command>.
|
|
|
|
</para>
|
2012-04-09 20:50:25 +08:00
|
|
|
<indexterm zone="cmake cmake-gui">
|
|
|
|
<primary sortas="b-cmake-gui">cmake-gui</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="cpack">
|
|
|
|
<term><command>cpack</command></term>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
is the <application>CMake</application> packaging program.
|
|
|
|
</para>
|
2012-04-09 20:50:25 +08:00
|
|
|
<indexterm zone="cmake cpack">
|
|
|
|
<primary sortas="b-cpack">cpack</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
2013-02-12 02:51:17 +08:00
|
|
|
</varlistentry>
|
|
|
|
|
2012-04-09 20:50:25 +08:00
|
|
|
<varlistentry id="ctest">
|
|
|
|
<term><command>ctest</command></term>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
is a testing utility for cmake-generated build trees.
|
|
|
|
</para>
|
2012-04-09 20:50:25 +08:00
|
|
|
<indexterm zone="cmake ctest">
|
|
|
|
<primary sortas="b-ctest">ctest</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2011-01-20 04:28:52 +08:00
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|