From cdb55c8c46939b2f9400542b6095c0b77d82f42d Mon Sep 17 00:00:00 2001 From: Hui Yu Date: Fri, 24 Sep 2021 14:02:44 +0800 Subject: [PATCH] [Doc] Reorganize readme for vcpkg --- README.md | 28 ++-------------------------- docs/vcpkg.md | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 26 deletions(-) create mode 100644 docs/vcpkg.md diff --git a/README.md b/README.md index 630ab0b..7ad7c18 100644 --- a/README.md +++ b/README.md @@ -46,32 +46,8 @@ make sudo make install ``` -## Installing using vcpkg -1- Download vcpkg from https://github.com/microsoft/vcpkg/ - -2- Run bootstrap-vcpkg script to prepare the repo - -3- Install the library using the command: -``` -./vcpkg install kubernetes[:triplet] -``` -To get a complete list of available triplets, run the command: -``` -vcpkg help triplet -``` -4- Add vcpkg integration to your project by using the toolchain parameter for cmake: -``` --DCMAKE_TOOLCHAIN_FILE=VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -``` -Or using the parameter in more recent CMake versions: -``` ---toolchain VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -``` -5- Add the library to your project using the following CMake commands: -``` -find_package(kubernetes CONFIG REQUIRED) -target_link_libraries(PROJECT PRIVATE kubernetes::kubernetes) -``` +## (Optional) Installing using vcpkg on Windows +If you want to install the C client using vcpkg, please refer to [vcpkg.md](https://github.com/kubernetes-client/c/blob/master/docs/vcpkg.md) ## Building an example ```bash diff --git a/docs/vcpkg.md b/docs/vcpkg.md new file mode 100644 index 0000000..793438d --- /dev/null +++ b/docs/vcpkg.md @@ -0,0 +1,26 @@ +# Installing using vcpkg +1- Download vcpkg from https://github.com/microsoft/vcpkg/ + +2- Run bootstrap-vcpkg script to prepare the repo + +3- Install the library using the command: +``` +./vcpkg install kubernetes[:triplet] +``` +To get a complete list of available triplets, run the command: +``` +vcpkg help triplet +``` +4- Add vcpkg integration to your project by using the toolchain parameter for cmake: +``` +-DCMAKE_TOOLCHAIN_FILE=VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake +``` +Or using the parameter in more recent CMake versions: +``` +--toolchain VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake +``` +5- Add the library to your project using the following CMake commands: +``` +find_package(kubernetes CONFIG REQUIRED) +target_link_libraries(PROJECT PRIVATE kubernetes::kubernetes) +``` \ No newline at end of file