Skip to content
Snippets Groups Projects

Add vcpkg support

Merged Joscha Schmiedt requested to merge f-test-vcpkg into dev
Files
6
+ 30
2
@@ -19,6 +19,34 @@ which have ``make`` installed, type this in your command line terminal:
make conan
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 .
Manual build
~~~~~~~~~~~~
@@ -28,7 +56,7 @@ package manager. The compiler must support the C++17 standard.
1. clone/update the subrepo ``git submodule update --init proto``
2. ``conan install . -s build_type=Release --build=missing``
3. ``cd build/Release``
4. ``cmake .``
4. ``cmake -S ../.. -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release``
5. ``cmake --build .``
You may also want to install libcaosdb system-wide to
@@ -74,7 +102,7 @@ as compiler. We use `cmake <https://cmake.org/download/>`__ as build
tool.
1. clone/update the subrepo ``git submodule update --init proto``
2. ``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``
2. :code:``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``
3. ``cd build/Release``
5. ``cmake -B . ..``
6. open ``libcaosdb.sln`` with Visual Studio, change the buildtype to
Loading