blob: cd66a4cc7843d36cd3de016cb66b4fceec4974bf [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DeployQt4 &mdash; CMake 3.8.2 Documentation</title>
<link rel="stylesheet" href="../_static/cmake.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '3.8.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Documentation" href="Documentation.html" />
<link rel="prev" title="Dart" href="Dart.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="Documentation.html" title="Documentation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Dart.html" title="Dart"
accesskey="P">previous</a> |</li>
<li>
<img src="../_static/cmake-logo-16.png" alt=""
style="vertical-align: middle; margin-top: -2px" />
</li>
<li>
<a href="https://cmake.org/">CMake</a> &#187;
</li>
<li>
<a href="../index.html">3.8.2 Documentation</a> &#187;
</li>
<li class="nav-item nav-item-1"><a href="../manual/cmake-modules.7.html" accesskey="U">cmake-modules(7)</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="deployqt4">
<span id="module:DeployQt4"></span><h1>DeployQt4<a class="headerlink" href="#deployqt4" title="Permalink to this headline">ΒΆ</a></h1>
<p>Functions to help assemble a standalone Qt4 executable.</p>
<p>A collection of CMake utility functions useful for deploying Qt4
executables.</p>
<p>The following functions are provided by this module:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">write_qt4_conf</span>
<span class="n">resolve_qt4_paths</span>
<span class="n">fixup_qt4_executable</span>
<span class="n">install_qt4_plugin_path</span>
<span class="n">install_qt4_plugin</span>
<span class="n">install_qt4_executable</span>
</pre></div>
</div>
<p>Requires CMake 2.6 or greater because it uses function and
PARENT_SCOPE. Also depends on BundleUtilities.cmake.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">WRITE_QT4_CONF</span><span class="p">(</span><span class="o">&lt;</span><span class="n">qt_conf_dir</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">qt_conf_contents</span><span class="o">&gt;</span><span class="p">)</span>
</pre></div>
</div>
<p>Writes a qt.conf file with the &lt;qt_conf_contents&gt; into &lt;qt_conf_dir&gt;.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">RESOLVE_QT4_PATHS</span><span class="p">(</span><span class="o">&lt;</span><span class="n">paths_var</span><span class="o">&gt;</span> <span class="p">[</span><span class="o">&lt;</span><span class="n">executable_path</span><span class="o">&gt;</span><span class="p">])</span>
</pre></div>
</div>
<p>Loop through &lt;paths_var&gt; list and if any don&#8217;t exist resolve them
relative to the &lt;executable_path&gt; (if supplied) or the
CMAKE_INSTALL_PREFIX.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">FIXUP_QT4_EXECUTABLE</span><span class="p">(</span><span class="o">&lt;</span><span class="n">executable</span><span class="o">&gt;</span>
<span class="p">[</span><span class="o">&lt;</span><span class="n">qtplugins</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">libs</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">dirs</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">plugins_dir</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">request_qt_conf</span><span class="o">&gt;</span><span class="p">])</span>
</pre></div>
</div>
<p>Copies Qt plugins, writes a Qt configuration file (if needed) and
fixes up a Qt4 executable using BundleUtilities so it is standalone
and can be drag-and-drop copied to another machine as long as all of
the system libraries are compatible.</p>
<p>&lt;executable&gt; should point to the executable to be fixed-up.</p>
<p>&lt;qtplugins&gt; should contain a list of the names or paths of any Qt
plugins to be installed.</p>
<p>&lt;libs&gt; will be passed to BundleUtilities and should be a list of any
already installed plugins, libraries or executables to also be
fixed-up.</p>
<p>&lt;dirs&gt; will be passed to BundleUtilities and should contain and
directories to be searched to find library dependencies.</p>
<p>&lt;plugins_dir&gt; allows an custom plugins directory to be used.</p>
<p>&lt;request_qt_conf&gt; will force a qt.conf file to be written even if not
needed.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">INSTALL_QT4_PLUGIN_PATH</span><span class="p">(</span><span class="n">plugin</span> <span class="n">executable</span> <span class="n">copy</span> <span class="n">installed_plugin_path_var</span>
<span class="o">&lt;</span><span class="n">plugins_dir</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">component</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">configurations</span><span class="o">&gt;</span><span class="p">)</span>
</pre></div>
</div>
<p>Install (or copy) a resolved &lt;plugin&gt; to the default plugins directory
(or &lt;plugins_dir&gt;) relative to &lt;executable&gt; and store the result in
&lt;installed_plugin_path_var&gt;.</p>
<p>If &lt;copy&gt; is set to TRUE then the plugins will be copied rather than
installed. This is to allow this module to be used at CMake time
rather than install time.</p>
<p>If &lt;component&gt; is set then anything installed will use this COMPONENT.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">INSTALL_QT4_PLUGIN</span><span class="p">(</span><span class="n">plugin</span> <span class="n">executable</span> <span class="n">copy</span> <span class="n">installed_plugin_path_var</span>
<span class="o">&lt;</span><span class="n">plugins_dir</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">component</span><span class="o">&gt;</span><span class="p">)</span>
</pre></div>
</div>
<p>Install (or copy) an unresolved &lt;plugin&gt; to the default plugins
directory (or &lt;plugins_dir&gt;) relative to &lt;executable&gt; and store the
result in &lt;installed_plugin_path_var&gt;. See documentation of
INSTALL_QT4_PLUGIN_PATH.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">INSTALL_QT4_EXECUTABLE</span><span class="p">(</span><span class="o">&lt;</span><span class="n">executable</span><span class="o">&gt;</span>
<span class="p">[</span><span class="o">&lt;</span><span class="n">qtplugins</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">libs</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">dirs</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">plugins_dir</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">request_qt_conf</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">component</span><span class="o">&gt;</span><span class="p">])</span>
</pre></div>
</div>
<p>Installs Qt plugins, writes a Qt configuration file (if needed) and
fixes up a Qt4 executable using BundleUtilities so it is standalone
and can be drag-and-drop copied to another machine as long as all of
the system libraries are compatible. The executable will be fixed-up
at install time. &lt;component&gt; is the COMPONENT used for bundle fixup
and plugin installation. See documentation of FIXUP_QT4_BUNDLE.</p>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="Dart.html"
title="previous chapter">Dart</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Documentation.html"
title="next chapter">Documentation</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/module/DeployQt4.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="Documentation.html" title="Documentation"
>next</a> |</li>
<li class="right" >
<a href="Dart.html" title="Dart"
>previous</a> |</li>
<li>
<img src="../_static/cmake-logo-16.png" alt=""
style="vertical-align: middle; margin-top: -2px" />
</li>
<li>
<a href="https://cmake.org/">CMake</a> &#187;
</li>
<li>
<a href="../index.html">3.8.2 Documentation</a> &#187;
</li>
<li class="nav-item nav-item-1"><a href="../manual/cmake-modules.7.html" >cmake-modules(7)</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2000-2017 Kitware, Inc. and Contributors.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.2.
</div>
</body>
</html>