From 450e14e97965c9f9f17b20926987c64851fbea32 Mon Sep 17 00:00:00 2001 From: Joscha Schmiedt <joscha@schmiedt.dev> Date: Wed, 14 Aug 2024 09:19:57 +0200 Subject: [PATCH] Add make vcpkg-build-release to build instructions --- doc/Install_develop.rst | 69 +++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/doc/Install_develop.rst b/doc/Install_develop.rst index e29e7a2..f7dd3f1 100644 --- a/doc/Install_develop.rst +++ b/doc/Install_develop.rst @@ -9,8 +9,8 @@ Dependencies Build ----- -Building with ``make`` -~~~~~~~~~~~~~~~~~~~~~~ +Building with ``make`` and Conan +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Make sure that the dependencies (see above) are fulfilled. On systems which have ``make`` installed, type this in your command line terminal: @@ -19,37 +19,9 @@ which have ``make`` installed, type this in your command line terminal: make conan -Building with ``vcpkg`` +Manual build with Conan ~~~~~~~~~~~~~~~~~~~~~~~ -Instead of Conan, you can use the vcpkg package manager to install the dependencies (`vcpkg.json`). It's included as -a submodule in the project. To install the dependencies, run the following commands: - -.. code:: console - - ./vcpkg/bootstrap-vcpkg.<sh/bat> - vcpkg/vcpkg install - - -Copy the ``grpc-cpp-plugin`` to the build directory (TODO: This should ideally be done automatically by CMake): - -.. code:: console - - mkdir -p build/build_tools - cp vcpkg_installed/<os>/tools/grpc/grpc_cpp_plugin build/build_tools - -Then compile the project with CMake by including the vcpkg toolchain file: - -.. code:: console - - cd build - cmake -S .. -B . -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-linux -DCMAKE_BUILD_TYPE=Release - cmake --build . - - -Manual build -~~~~~~~~~~~~ - We use `cmake <https://cmake.org>`__ as build tool, with Conan as package manager. The compiler must support the C++17 standard. @@ -79,6 +51,41 @@ If you want to build or install libcaosdb without the use of Conan, feel free to rewrite the CMakeLists.txt as needed. The CaosDB project is open to merge requests which support multiple ways of installation. +Building with ``vcpkg`` +~~~~~~~~~~~~~~~~~~~~~~~ + +Instead of Conan, you can use the vcpkg package manager to install the dependencies (`vcpkg.json`). It's included as +a submodule in the project. To install the dependencies, run the following commands: + +.. code:: console + + ./vcpkg/bootstrap-vcpkg.<sh/bat> + vcpkg/vcpkg install + + +Copy the ``grpc-cpp-plugin`` to the build directory (TODO: This should ideally be done automatically by CMake): + +.. code:: console + + mkdir -p build/build_tools + cp vcpkg_installed/<os>/tools/grpc/grpc_cpp_plugin build/build_tools + +Then compile the project with CMake by including the vcpkg toolchain file: + +.. code:: console + + cd build + cmake -S .. -B . -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-linux -DCMAKE_BUILD_TYPE=Release + cmake --build . + +Alternatively, on Linux, you can use the provided `Makefile` targets + +.. code:: console + + make vcpkg-build-release + + + How to build on MacOS ~~~~~~~~~~~~~~~~~~~~~ -- GitLab