diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 8895d2070e..f54442a04d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -53,6 +53,10 @@ RUN apt install --yes \ libxrandr-dev \ wget +# vcpkg +RUN apt install --yes \ + curl zip unzip tar + # work arround as there is no debug version available RUN cp /lib/x86_64-linux-gnu/libcpptest.so /lib/x86_64-linux-gnu/libcpptestd.so @@ -76,3 +80,9 @@ RUN groupadd --gid $USER_GID $USERNAME \ && chmod 0440 /etc/sudoers.d/$USERNAME USER $USERNAME + +ENV VCPKG_ROOT="/home/$USERNAME/vcpkg" +ENV PATH="$PATH:$VCPKG_ROOT" + +RUN git clone https://github.com/microsoft/vcpkg.git $VCPKG_ROOT +RUN $VCPKG_ROOT/bootstrap-vcpkg.sh --disableMetrics diff --git a/.github/workflows/ci-nel.yml b/.github/workflows/ci-nel.yml index 93cac9d46e..b50539eb94 100644 --- a/.github/workflows/ci-nel.yml +++ b/.github/workflows/ci-nel.yml @@ -5,7 +5,6 @@ on: branches: [ "core4", "feature/*" ] paths: - .github/workflows/ci-nel.yml - - cmake/CMakePresets.nel.json - nel/** - CMakeLists.txt - CMakePresets.txt @@ -14,7 +13,6 @@ on: branches: [ "core4" ] paths: - .github/workflows/ci-nel.yml - - cmake/CMakePresets.nel.json - nel/** - CMakeLists.txt - CMakePresets.txt diff --git a/CMakePresets.json b/CMakePresets.json index c4f4b73d4c..5e4008de9b 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -2,7 +2,7 @@ "version": 6, "include": [ "cmake/CMakePresets.base.json", - "cmake/CMakePresets.nel.json", + "nel/CMakePresets.json", "cmake/CMakePresets.nelns.json", "snowballs2/CMakePresets.json" ] diff --git a/cmake/CMakePresets.base.json b/cmake/CMakePresets.base.json index 842de80162..a9b4b932c4 100644 --- a/cmake/CMakePresets.base.json +++ b/cmake/CMakePresets.base.json @@ -30,6 +30,12 @@ "WITH_LIBGSF": true } }, + { + "name": "vcpkg", + "cacheVariables": { + "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + } + }, { "inherits": [ "default" diff --git a/cmake/CMakePresets.nel.json b/nel/CMakePresets.json similarity index 93% rename from cmake/CMakePresets.nel.json rename to nel/CMakePresets.json index 3fb8471d26..e740b91a83 100644 --- a/cmake/CMakePresets.nel.json +++ b/nel/CMakePresets.json @@ -1,8 +1,8 @@ { "version": 6, "include": [ - "CMakePresets.base.json", - "CMakePresets.os.json" + "../cmake/CMakePresets.base.json", + "../cmake/CMakePresets.os.json" ], "configurePresets": [ { @@ -31,6 +31,7 @@ { "inherits": [ "linux", + "vcpkg", "nel" ], "name": "linux-nel" diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json new file mode 100644 index 0000000000..a23641e907 --- /dev/null +++ b/vcpkg-configuration.json @@ -0,0 +1,14 @@ +{ + "default-registry": { + "kind": "git", + "baseline": "47bf3d1ac192b3fa0feb6e6ac9c845de179eebe9", + "repository": "https://github.com/microsoft/vcpkg" + }, + "registries": [ + { + "kind": "artifact", + "location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip", + "name": "microsoft" + } + ] +} diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000000..49bed92f23 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,6 @@ +{ + "dependencies": [ + "gtest", + "openssl" + ] +}