blob: 59a0c4c37a9bed44afb52f864e34ea37460ac1d9 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>CMake Commands / Apache Celix</title>
<link rel="icon" href="/assets/img/favicon.ico">
<link href="/assets/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/css/style.css" rel="stylesheet">
<style>
.card-body img {
max-width: 100%;
width: 100%;
height: auto;
}
.card-body img + em {
text-decoration: underline;
}
</style>
<script>
var _paq = window._paq = window._paq || [];
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '9']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
</head>
<body class="light-grey">
<a href="https://github.com/apache/celix" class="github-ribbon">
<img src="/assets/img/forkme_right_red_aa0000.png" alt="Fork me on GitHub">
</a>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top">
<div class="container">
<a class="navbar-brand" href="/">
<img src="/assets/img/celix-white.svg" height="40" class="d-inline-block align-top" alt="Celix Logo">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/download.cgi">Download</a>
</li>
<li class="nav-item dropdown active">
<a class="nav-link dropdown-toggle" href="#" id="ddDocs" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Docs
</a>
<div class="dropdown-menu" aria-labelledby="ddDocs">
<a class="dropdown-item" href="/docs/2.4.0/docs.html">2.4.0 (latest)</a>
<a class="dropdown-item" href="/docs/2.3.0/docs.html">2.3.0</a>
<a class="dropdown-item" href="/docs/2.2.1/docs.html">2.2.1</a>
<a class="dropdown-item" href="/docs/2.1.0/docs.html">2.1.0</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="ddContributing" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Contributing
</a>
<div class="dropdown-menu" aria-labelledby="ddContributing">
<a class="dropdown-item" href="/contributing/youatcelix.html">You at Celix</a>
<a class="dropdown-item" href="/contributing/submitting-patches.html">Submitting patches</a>
<a class="dropdown-item" href="/contributing/source-and-builds.html">Source code and builds</a>
<hr>
<a class="dropdown-item" href="/contributing/releasing.html">Releasing</a>
<a class="dropdown-item" href="/contributing/volunteers.html">Volunteers</a>
<a class="dropdown-item" href="https://whimsy.apache.org/board/minutes/Celix.html">Board Reports</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="ddSupport" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Support
</a>
<div class="dropdown-menu" aria-labelledby="ddSupport">
<a class="dropdown-item" href="/support/mailing-list.html">Mailing Lists</a>
<a class="dropdown-item" href="/support/issue-tracking.html">Issue Tracking</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="ddFoundation" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
ASF
</a>
<div class="dropdown-menu" aria-labelledby="ddFoundation">
<a class="dropdown-item" href="https://www.apache.org/">ASF Home</a>
<a class="dropdown-item" href="https://www.apache.org/foundation/how-it-works.html">How it works</a>
<a class="dropdown-item" href="https://www.apache.org/licenses/">License</a>
<a class="dropdown-item" href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a>
<a class="dropdown-item" href="https://www.apache.org/foundation/thanks.html">Thanks</a>
<a class="dropdown-item" href="https://www.apache.org/security/">Security</a>
<a class="dropdown-item" href="https://www.apache.org/foundation/policies/conduct">Code of Conduct</a>
</div>
</li>
</ul>
</div>
</div>
</nav>
<div class="section">
<div class="container">
<div class="row py-4">
<div class="col-sm-12 card">
<div class="card-body pt-5">
<a href="/docs/2.1.0/docs.html" title="back to documentation">&lt;&lt; back to documentation</a>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<h1 id="apache-celix---cmake-commands">Apache Celix - CMake Commands</h1>
<p>For Apache Celix several cmake command are added to be able to work with Apache Celix bundles and deployments.</p>
<h1 id="bundles">Bundles</h1>
<h2 id="add_celix_bundle">add_celix_bundle</h2>
<p>Add a Celix bundle to the project. There are three variants:</p>
<ul>
<li>With SOURCES the bundle will be created using a list of sources files as input for the bundle activator library.</li>
<li>With ACTIVATOR the bundle will be created using the library target or absolute path to existing library as activator library.</li>
<li>With no SOURCES or ACTIVATOR a bundle without a activator will be created.</li>
</ul>
<p>Also available under the add_bundle CMake function (deprecated).</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">add_celix_bundle</span>(<span style="color:#b44">&lt;bundle_target_name&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">SOURCES</span> <span style="color:#b44">source1</span> <span style="color:#b44">source2</span> <span style="color:#b44">...</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[NAME</span> <span style="color:#b44">bundle_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[SYMBOLIC_NAME</span> <span style="color:#b44">bundle_symbolic_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[DESCRIPTION</span> <span style="color:#b44">bundle_description]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[VERSION</span> <span style="color:#b44">bundle_version]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[PRIVATE_LIBRARIES</span> <span style="color:#b44">private_lib1</span> <span style="color:#b44">private_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[EXPORT_LIBRARIES</span> <span style="color:#b44">export_lib1</span> <span style="color:#b44">export_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[IMPORT_LIBRARIES</span> <span style="color:#b44">import_lib1</span> <span style="color:#b44">import_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[HEADERS</span> <span style="color:#b44">&#34;header1: header1_value&#34;</span> <span style="color:#b44">&#34;header2: header2_value&#34;</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">add_celix_bundle</span>(<span style="color:#b44">&lt;bundle_target_name&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">ACTIVATOR</span> <span style="color:#b44">&lt;activator_lib&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[NAME</span> <span style="color:#b44">bundle_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[SYMBOLIC_NAME</span> <span style="color:#b44">bundle_symbolic_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[DESCRIPTION</span> <span style="color:#b44">bundle_description]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[VERSION</span> <span style="color:#b44">bundle_version]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[PRIVATE_LIBRARIES</span> <span style="color:#b44">private_lib1</span> <span style="color:#b44">private_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[EXPORT_LIBRARIES</span> <span style="color:#b44">export_lib1</span> <span style="color:#b44">export_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[IMPORT_LIBRARIES</span> <span style="color:#b44">import_lib1</span> <span style="color:#b44">import_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[HEADERS</span> <span style="color:#b44">&#34;header1: header1_value&#34;</span> <span style="color:#b44">&#34;header2: header2_value&#34;</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">add_celix_bundle</span>(<span style="color:#b44">&lt;bundle_target_name&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[NAME</span> <span style="color:#b44">bundle_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[SYMBOLIC_NAME</span> <span style="color:#b44">bundle_symbolic_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[DESCRIPTION</span> <span style="color:#b44">bundle_description]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[VERSION</span> <span style="color:#b44">bundle_version]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[PRIVATE_LIBRARIES</span> <span style="color:#b44">private_lib1</span> <span style="color:#b44">private_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[EXPORT_LIBRARIES</span> <span style="color:#b44">export_lib1</span> <span style="color:#b44">export_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[IMPORT_LIBRARIES</span> <span style="color:#b44">import_lib1</span> <span style="color:#b44">import_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[HEADERS</span> <span style="color:#b44">&#34;header1: header1_value&#34;</span> <span style="color:#b44">&#34;header2: header2_value&#34;</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div><ul>
<li>If NAME is provided that will be used as Bundle-Name. Default the bundle target name is used as symbolic name.</li>
<li>If SYMBOLIC_NAME is provided that will be used as Bundle-SymbolicName. Default the bundle target name is used as symbolic name.</li>
<li>If DESCRIPTION is provided that will be used as Bundle-Description. Default this is empty</li>
<li>If VERSION is provided. That will be used for the Bundle-Version. In combination with SOURCES the version will alse be use to set the activator library target property VERSION and SOVERSION.
For SOVERSION only the major part is used. Expected scheme is &ldquo;<major>.<minor>.<path>&rdquo;. Default version is &ldquo;0.0.0&rdquo;</li>
<li>If PRIVATE_LIBRARIES is provided all provided lib are added to the &ldquo;Private-Library&rdquo; manifest statement and added in the root of the bundle. libraries can be cmake library targets or absolute paths to existing libraries.</li>
<li>If EXPORT_LIBRARIES is provided all provided lib are added to the &ldquo;Export-Library&rdquo; manifest statement and added in the root of the bundle. libraries can be cmake library targets or absolute paths to existing libraries. This is not yet supported by the celix framework.</li>
<li>If IMPORT_LIBRARIES is provided all provided lib are added to the &ldquo;Import-Library&rdquo; manifest statement and added in the root of the bundle. libraries can be cmake library targets or absolute paths to existing libraries. This is not yet supported by the celix framework</li>
<li>If HEADERS is provided the headers values are appended to the bundle manifest.</li>
</ul>
<h2 id="celix_bundle_private_libs">celix_bundle_private_libs</h2>
<p>Add libraries to a bundle target. The libraries should be cmake library targets or an absolute path to a existing library.</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">celix_bundle_private_libs</span>(<span style="color:#b44">&lt;bundle_target&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">lib1</span> <span style="color:#b44">lib2</span> <span style="color:#b44">...</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div><h2 id="celix_bundle_files">celix_bundle_files</h2>
<p>Add files to the target bundle. DESTINATION is relative to the bundle archive root.
The rest of the command is conform file(COPY &hellip;) cmake command.
See cmake file(COPY &hellip;) command for more info.</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">celix_bundle_files</span>(<span style="color:#b44">&lt;bundle_target&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">files...</span> <span style="color:#b44">DESTINATION</span> <span style="color:#b44">&lt;dir&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[FILE_PERMISSIONS</span> <span style="color:#b44">permissions...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[DIRECTORY_PERMISSIONS</span> <span style="color:#b44">permissions...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[NO_SOURCE_PERMISSIONS]</span> <span style="color:#b44">[USE_SOURCE_PERMISSIONS]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[FILES_MATCHING]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[[PATTERN</span> <span style="color:#b44">&lt;pattern&gt;</span> <span style="color:#b44">|</span> <span style="color:#b44">REGEX</span> <span style="color:#b44">&lt;regex&gt;]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[EXCLUDE]</span> <span style="color:#b44">[PERMISSIONS</span> <span style="color:#b44">permissions...]]</span> <span style="color:#b44">[...]</span>)<span style="">
</span></span></span><span style="display:flex;"><span><span style="">)
</span></span></span></code></pre></div><h2 id="celix_bundle_headers">celix_bundle_headers</h2>
<p>Append the provided headers to the target bundle manifest.</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">celix_bundle_headers</span>(<span style="color:#b44">&lt;bundle_target&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">&#34;header1: header1_value&#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">&#34;header2: header2_value&#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">...</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div><h2 id="celix_bundle_symbolic_name">celix_bundle_symbolic_name</h2>
<p>Set bundle symbolic name</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">celix_bundle_symbolic_name</span>(<span style="color:#b44">&lt;bundle_target&gt;</span> <span style="color:#b44">symbolic_name</span>)<span style="">
</span></span></span></code></pre></div><h2 id="celix_bundle_name">celix_bundle_name</h2>
<p>Set bundle name</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">celix_bundle_name</span>(<span style="color:#b44">&lt;bundle_target&gt;</span> <span style="color:#b44">name</span>)<span style="">
</span></span></span></code></pre></div><h2 id="celix_bundle_version">celix_bundle_version</h2>
<p>Set bundle version</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">celix_bundle_version</span>(<span style="color:#b44">&lt;bundle_target&gt;</span> <span style="color:#b44">version</span>)<span style="">
</span></span></span></code></pre></div><h2 id="celix_bundle_description">celix_bundle_description</h2>
<p>Set bundle description</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">celix_bundle_description</span>(<span style="color:#b44">&lt;bundle_target&gt;</span> <span style="color:#b44">description</span>)<span style="">
</span></span></span></code></pre></div><h2 id="install_celix_bundle">install_celix_bundle</h2>
<p>Install bundle when &lsquo;make install&rsquo; is executed.
Bundles are installed at <code>&lt;install-prefix&gt;/share/&lt;project_name&gt;/bundles</code>.
Headers are installed at <code>&lt;install-prefix&gt;/include/&lt;project_name&gt;/&lt;bundle_name&gt;</code>
Resources are installed at <code>&lt;install-prefix&gt;/shared/&lt;project_name&gt;/&lt;bundle_name&gt;</code></p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">install_celix_bundle</span>(<span style="color:#b44">&lt;bundle_target&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[PROJECT_NAME]</span> <span style="color:#b44">project_name</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[BUNDLE_NAME]</span> <span style="color:#b44">bundle_name</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[HEADERS</span> <span style="color:#b44">header_file1</span> <span style="color:#b44">header_file2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[RESOURCES</span> <span style="color:#b44">resource1</span> <span style="color:#b44">resource2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div><ul>
<li>If PROJECT_NAME is provided that will be used as project name for installing. Default is the cmake project name.</li>
<li>If BUNDLE_NAME is provided that will be used as bundle for installing the headers. Default is the bundle target name.</li>
<li>If HEADERS is provided the list of provided headers will be installed.</li>
<li>If RESOURCES is provided the list of provided resources will be installed.</li>
</ul>
<h1 id="celix-containers">Celix Containers</h1>
<h2 id="add_celix_container">add_celix_container</h2>
<p>Add a Celix container, consisting out of a selection of bundles and a simple Celix launcher.
Celix containers can be used to run/test a selection of bundles in the celix framework.
A Celix container can be found in <code>&lt;cmake_build_dir&gt;/deploy[/&lt;group_name&gt;]/&lt;celix_container_name&gt;</code>.
Use the <code>&lt;celix_container_name&gt;</code> executable to run the deployments.</p>
<p>Also available under the add_deploy CMake function (deprecated).</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">add_celix_container</span>(<span style="color:#b44">&lt;celix_container_name&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[COPY]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[CXX]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[GROUP</span> <span style="color:#b44">group_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[NAME</span> <span style="color:#b44">celix_container_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[LAUNCHER</span> <span style="color:#b44">launcher]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[DIR</span> <span style="color:#b44">dir]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[BUNDLES</span> <span style="color:#b44">&lt;bundle1&gt;</span> <span style="color:#b44">&lt;bundle2&gt;</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[PROPERTIES</span> <span style="color:#b44">&#34;prop1=val1&#34;</span> <span style="color:#b44">&#34;prop2=val2&#34;</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div><p>The provided bundle targets for a celix container do not have to exists (yet).
This removes the need for correctly ordering the add_celix_bundle commands so that all bundle target are present before an add_celix_container command.
If the bundle target is never added CMake will give an error:</p>
<pre tabindex="0"><code> Error evaluating generator expression:
$&lt;TARGET_PROPERTY:foo,BUNDLE_FILE&gt;
</code></pre><ul>
<li>If the COPY option is provided the selected bundles will be copied in a bundles dir and the generated config.properties will use relative paths to the bundle locations. Default bundles will not be copied and the generated config.properties will use absolute references to the bundle locations.</li>
<li>If CXX option is provided the celix container launcher will be build as C++ executable and as result be linked with the required C++ libraries of the used compiler</li>
<li>If GROUP is provided the celix container will be grouped in the provided group name.</li>
<li>If NAME is provided that name will be used for the celix container dir. Default the Celix container target name will be used.</li>
<li>If LAUNCHER is provided that path or target will be used as launcher executable for the Celix container. If no LAUNCHER is not provided the celix executable will be used.</li>
<li>If DIR is provided, the specified dir is used instead of <code>&lt;cmake_build_dir&gt;/deploy</code> as deploy dir</li>
<li>If BUNDLES is provided the list of bundles will be added the the generated config.properties for startup. Combined with COPY the bundles will also be copied to a bundles dir.</li>
<li>If PROPERTIES is provided the list of properties will be appended to the generated config.properties</li>
</ul>
<h2 id="celix_container_bundles_dir">celix_container_bundles_dir</h2>
<p>Deploy a selection of bundles to the provided bundle dir. This can be used to create an endpoints / proxies bundles dir for the remote service admin or drivers bundles dir for the device access.</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">celix_container_bundles_dir</span>(<span style="color:#b44">&lt;celix_container_target_name&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">DIR_NAME</span> <span style="color:#b44">dir_name</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">BUNDLES</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">bundle1</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">bundle2</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">...</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div><h2 id="celix_container_bundles">celix_container_bundles</h2>
<p>Deploy the selected bundles. The bundles are configured for auto starting.</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">celix_container_bundles</span>(<span style="color:#b44">&lt;celix_container_target_name&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">bundle1</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">bundle2</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">...</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div><h2 id="celix_container_properties">celix_container_properties</h2>
<p>Add the provided properties to the target Celix container config.properties.</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">celix_container_properties</span>(<span style="color:#b44">&lt;celix_container_target_name&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">&#34;prop1=val1&#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">&#34;prop2=val2&#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">...</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div><h2 id="celix_cotainer_embedded_properties">celix_cotainer_embedded_properties</h2>
<p>Embeds the provided properties to the target Celix launcher as embedded properties.
Note that these properties can be overridden by using config.properties.</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">celix_container_embedded_properties</span>(<span style="color:#b44">&lt;celix_container_target_name&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">&#34;prop1=val1&#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">&#34;prop2=val2&#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">...</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div><h1 id="celix-docker-images">Celix Docker Images</h1>
<p>It is possible the use the <code>add_celix_docker</code> Apache Celix CMake command to create Apache Celix docker directories,
which in turn can be used to create very small Apache Celix docker images.</p>
<h2 id="add_celix_docker">add_celix_docker</h2>
<p>Adds a docker target dir, containing a all the required executables,
libraries and filesystem needed to run a Apache Celix framework in a docker container.
Also includes the selected bundles.</p>
<p>The add_celix_docker target is a executable target and can be used to link libraries which are needed in the docker image.</p>
<p>The docker dir can be found in <code>&lt;cmake_build_dir&gt;/docker[/&lt;group_name&gt;]/&lt;docker_name&gt;</code>.</p>
<p>The provided bundle targets for a docker dir do not have to exists (yet).
This removes the need for correctly order the add_celix_bundle commands so that all bundle target are present before
an <code>add_celix_docker</code> command.
If the bundle target is never added CMake will give an error:</p>
<pre tabindex="0"><code> Error evaluating generator expression:
$&lt;TARGET_PROPERTY:foo,BUNDLE_FILE&gt;
</code></pre><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">add_celix_docker</span>(<span style="color:#b44">&lt;docker_target_name&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[CXX]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[GROUP</span> <span style="color:#b44">group_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[NAME</span> <span style="color:#b44">deploy_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[FROM</span> <span style="color:#b44">docker_from_image]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[BUNDLES_DIR</span> <span style="color:#b44">bundle_dir_in_docker_image]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[WORKDIR</span> <span style="color:#b44">workdir_in_docker_image]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[IMAGE_NAME</span> <span style="color:#b44">docker_image_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[BUNDLES</span> <span style="color:#b44">&lt;bundle1&gt;</span> <span style="color:#b44">&lt;bundle2&gt;</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[PROPERTIES</span> <span style="color:#b44">&#34;prop1=val1&#34;</span> <span style="color:#b44">&#34;prop2=val2&#34;</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[INSTRUCTIONS</span> <span style="color:#b44">&#34;instr1&#34;</span> <span style="color:#b44">&#34;instr2&#34;</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div><ul>
<li>If CXX is set the entrypoint executable will be created as a C++ main file, default it is a C main file.</li>
<li>If GROUP is provided the docker will be grouped in the provided group name.</li>
<li>If NAME is provided that name will be used for the docker dir. Default the deploy target name will be used.</li>
<li>If FROM is provided the docker image will use the provide FROM as base, else <code>FROM scratch</code> is used and
a minimal filesystem will be created for the docker image</li>
<li>If BUNDLES_DIR is provided that directory will be used as bundles location. Default <code>/bundles</code> will be used</li>
<li>If WORKDIR is provided that directory will be used a workdir. Default <code>/root</code> will be used</li>
<li>If IMAGE_NAME is provided that will be used as docker image name. Default the NAME will be used</li>
<li>If BUNDLES is provided, the list of bundles will be added to the docker images and configured in the generated
<code>config.properties</code></li>
<li>If PROPERTIES is provided, the list of properties will added to the generated <code>config.properties</code> file</li>
<li>If INSTRUCTIONS id provided, the list of docker instructions will be added the the generated <code>Dockerfile</code></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<footer class="py-3 bg-secondary">
<div class="container">
<div class="row">
<div class="col-md-8 text-center">
<p class="m-0 text-white">
Copyright &copy; 2023 The Apache Software Foundation, Licensed under
the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
<br>
Apache Celix, Celix, Apache, the Apache feather logo and the Apache Celix logo are trademarks of The Apache Software Foundation.
</p>
</div>
<div class="col-md-4 text-center">
<a href="https://www.apache.org/events/current-event.html" target="_blank">
<img src="https://www.apache.org/events/current-event-234x60.png" title="Apache Event" width="234" height="60" border="0">
</a>
</div>
</div>
</div>
</footer>
<script src="/assets/js/jquery.min.js"></script>
<script src="/assets/js/bootstrap.bundle.min.js"></script>
</body>
</html>