-
Daniel Hornung authoredDaniel Hornung authored
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
- See DEPENDENCIES.md
Build
We use cmake as build tool.
- clone/update the subrepo
git submodule update --init proto
mkdir build && cd build
conan install .. -s "compiler.libcxx=libstdc++11"
cmake -B . ..
cmake --build .
You may also want to install libcaosdb system-wide to
CMAKE_INSTALL_PREFIX/lib
by
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
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.
- clone/update the subrepo
git submodule update --init proto
mkdir build
cd build
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
cmake -B . ..
- open
libcaosdb.sln
with Visual Studio, change the buildtype toRelease
and build the project. (You can open Tools/Command Line/Developer Command Prompt and executemsbuild 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.