Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
README_SETUP.md 4.39 KiB

How to Develop and Use Libcaosdb

Dependencies

Build

We use cmake as build tool.

  1. clone/update the subrepo git submodule update --init proto
  2. mkdir build && cd build
  3. conan install .. -s "compiler.libcxx=libstdc++11"
  4. cmake -B . ..
  5. cmake --build .

You may also want to install libcaosdb system-wide to CMAKE_INSTALL_PREFIX/lib by

  1. cmake --install .

The default install prefix is ~/.local. It can be set by adding -DCMAKE_INSTALL_PREFIX=/path/to/install/prefix to the first cmake command (3.).

How to build on MacOS

Instead of the above conan command (2.) use

  1. conan install .. -s "cppstd=11"

and continue as you would when building on a Linux system. You may have to add build/lib/ (or, alternatively after installation, CMAKE_INSTALL_PREFIX/lib) to your DYLD_LIBRARY_PATH environmental variable.

How to build on Windows

We use Visual Studio 2019 as compiler. We use cmake as build tool.

  1. clone/update the subrepo git submodule update --init proto
  2. mkdir build
  3. cd build
  4. conan install .. -g visual_studio -s arch=x86_64 -s build_type=Release -s compiler.toolset=v142 -s compiler.version=16 -s compiler.runtime=MD --build=missing --update
  5. cmake -B . ..
  6. open libcaosdb.sln with Visual Studio, change the buildtype to Release and build the project. (You can open Tools/Command Line/Developer Command Prompt and execute msbuild libcaosdb.sln /property:Configuration=Release)

Creating a Local Conan Package

Building and installing libcaosdb with Conan is just a single command: make conan-install

For MacOS, you probably should adjust the option as mentioned above.

Troubleshooting