DISABLE_AZURE_PRESIGNED_IOMANAGER=ON/DISABLE_CURL_IOMANAGER=ON causes compilation error in Debug mode

Hi,

We wanted to turn off build of features that we don't need (I understand we have to download sources anyway, but can avoid building). Everything works fine in Release mode, but for some reason fails in Debug.

FROM alpine:latest
RUN apk --no-cache add git g++ gcc make cmake boost-dev util-linux-dev perl libuv-dev zlib-dev

ARG OPENVDS_VERSION=3.4.4
WORKDIR /
RUN git clone --depth 1 --branch ${OPENVDS_VERSION} https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/open-vds.git
WORKDIR /open-vds

ARG BUILD_TYPE=Release
RUN cmake -S . \
    -B build \
    -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
    -DBUILD_JAVA=OFF \
    -DBUILD_PYTHON=OFF \
    -DBUILD_EXAMPLES=OFF \
    -DBUILD_TESTS=OFF \
    -DBUILD_DOCS=OFF \
    -DDISABLE_STRICT_WARNINGS=OFF \
    -DDISABLE_AZURESDKFORCPP_IOMANAGER=OFF \
    -DDISABLE_AWS_IOMANAGER=ON \
    -DDISABLE_GCP_IOMANAGER=ON \
    -DDISABLE_DMS_IOMANAGER=ON \
    -DDISABLE_AZURE_PRESIGNED_IOMANAGER=ON \
    -DDISABLE_CURL_IOMANAGER=ON \
    -DBUILD_UV=OFF \
    -DBUILD_ZLIB=OFF

RUN cmake --build build --config ${BUILD_TYPE} --target install -j 8 --verbose

docker build -f Dockerfile --build-arg BUILD_TYPE=Release . compiles fine.

docker build -f Dockerfile --build-arg BUILD_TYPE=Debug . for some reason fails with errors like

undefined reference to `OpenVDS::IOManagerAzurePresigned::CreateIOManagerAzurePresigned

and

undefined reference to `OpenVDS::CurlHandler

What is wrong here?