Skip to content

Commit

Permalink
add vcpkg
Browse files Browse the repository at this point in the history
  • Loading branch information
zerotacg committed Jul 8, 2024
1 parent 5b98634 commit bd16a85
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
2 changes: 0 additions & 2 deletions .github/workflows/ci-nel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches: [ "core4", "feature/*" ]
paths:
- .github/workflows/ci-nel.yml
- cmake/CMakePresets.nel.json
- nel/**
- CMakeLists.txt
- CMakePresets.txt
Expand All @@ -14,7 +13,6 @@ on:
branches: [ "core4" ]
paths:
- .github/workflows/ci-nel.yml
- cmake/CMakePresets.nel.json
- nel/**
- CMakeLists.txt
- CMakePresets.txt
Expand Down
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down
6 changes: 6 additions & 0 deletions cmake/CMakePresets.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
"WITH_LIBGSF": true
}
},
{
"name": "vcpkg",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
},
{
"inherits": [
"default"
Expand Down
5 changes: 3 additions & 2 deletions cmake/CMakePresets.nel.json → nel/CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"version": 6,
"include": [
"CMakePresets.base.json",
"CMakePresets.os.json"
"../cmake/CMakePresets.base.json",
"../cmake/CMakePresets.os.json"
],
"configurePresets": [
{
Expand Down Expand Up @@ -31,6 +31,7 @@
{
"inherits": [
"linux",
"vcpkg",
"nel"
],
"name": "linux-nel"
Expand Down
14 changes: 14 additions & 0 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
6 changes: 6 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dependencies": [
"gtest",
"openssl"
]
}

0 comments on commit bd16a85

Please sign in to comment.