Skip to content

Commit

Permalink
define VCPKG_ROOT variable in environment
Browse files Browse the repository at this point in the history
  • Loading branch information
nam20485 committed Oct 19, 2023
1 parent dc436b9 commit 35b0cb3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Dockerfile_OdbDesignServer
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,29 @@ RUN apt-get update && \
tar \
pkg-config \
&& \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/*

ENV VCPKG_ROOT=/root/src/github/microsoft/vcpkg

# install vcpkg
WORKDIR /root/src/github/microsoft
RUN git clone --depth 1 https://github.com/Microsoft/vcpkg.git
WORKDIR /root/src/github/microsoft/vcpkg
RUN git clone https://github.com/Microsoft/vcpkg.git ${VCPKG_ROOT}
WORKDIR ${VCPKG_ROOT}
RUN ./bootstrap-vcpkg.sh

# pre-install vcpgk packages BEFORE cmake configure
RUN mkdir -p /src/OdbDesign
WORKDIR /src/OdbDesign
COPY ./vcpkg.json .
RUN /root/src/github/microsoft/vcpkg/vcpkg install
RUN ${VCPKG_ROOT}/vcpkg install

# copy source
COPY . .

# configure & build using presets
# linux-release
RUN cmake --preset linux-release -G Ninja
RUN cmake --build --preset linux-release --target OdbDesignServer
RUN cmake --preset linux-release
RUN cmake --build --preset linux-release
# # linux-debug
# RUN cmake --preset linux-debug
# RUN cmake --build --preset linux-debug
Expand Down

0 comments on commit 35b0cb3

Please sign in to comment.