From d1b14e4112dc39055be8bf0352bc75f40492be3e Mon Sep 17 00:00:00 2001 From: Pepijn Noltes Date: Sun, 10 Sep 2023 14:07:17 +0200 Subject: [PATCH] #99: Add conan info to building documentation --- documents/building/README.md | 47 ++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/documents/building/README.md b/documents/building/README.md index 5a9aa530b..1b5e2da5d 100644 --- a/documents/building/README.md +++ b/documents/building/README.md @@ -40,9 +40,10 @@ git clone --single-branch --branch master https://github.com/apache/celix.git ``` ## Building and installing -Apache Celix uses [CMake](https://cmake.org) as build system. CMake can generate (among others) makefiles. +Apache Celix can be build using [Conan](https://conan.io) as package manager/build system or by directly using +[CMake](https://cmake.org). -### Building and installing with preinstalled libraries +### Building Apache Celix using Conan The following packages (libraries + headers) should be installed on your system: * Development Environment @@ -50,6 +51,48 @@ The following packages (libraries + headers) should be installed on your system: * java or zip (for packaging bundles) * make (3.14 or higher) * git + * cmake (3.18 or higher) + * Conan (2 or higher) + +For Ubuntu 20.04, use the following commands: +```bash +sudo apt-get install -yq --no-install-recommends \ + build-essential \ + git \ + default-jdk \ + python3 \ + python3-pip + +#The cmake version for Ubuntu 20 is older than 3.14, +#use snap to install the latest cmake version +snap install cmake + +#Install conan +pip3 install -U conan +``` + +Configure conan default profile using automatic detection of the system +```bash +conan profile detect +``` + +Create Apache Celix package - and build the dependencies - in the Conan cache: +```bash +cd +conan create . --output-folder build --build missing -o build_all=True +``` + +Note installing Apache Celix is not required when using Conan, because Conan will install the Apache Celix package +in the local Conan cache. + +### Building Apache Celix directly using CMake +The following packages (libraries + headers) should be installed on your system: + +* Development Environment + * build-essentials (gcc/g++ or clang/clang++) + * java or zip (for packaging bundles) + * make (3.18 or higher) + * git * Apache Celix Dependencies * libzip * uuid