diff --git a/common.windows b/common.windows index 3e02e44..2ffc53b 100644 --- a/common.windows +++ b/common.windows @@ -5,18 +5,20 @@ # WINEARCH environment variable to either "win64" or "win32" # MXE_TARGET_ARCH argument to either "x86_64" or "i686". See http://mxe.cc/ # MXE_TARGET_THREAD argument to either "" or ".posix". Default is win32. See http://mxe.cc/ +# MXE_TARGET_LINK argument to either "static" or "shared" # # For example: # # ENV WINEARCH win64 # ARG MXE_TARGET_ARCH=x86_64 # ARG MXE_TARGET_THREAD= +# ARG MXE_TARGET_LINK=shared # # mxe master 2019-02-27 ARG MXE_GIT_TAG=2ce5587c94fc355b2c826c786a3ee018479d88d1 -ENV CMAKE_TOOLCHAIN_FILE /usr/src/mxe/usr/${MXE_TARGET_ARCH}-w64-mingw32.static${MXE_TARGET_THREAD}/share/cmake/mxe-conf.cmake +ENV CMAKE_TOOLCHAIN_FILE /usr/src/mxe/usr/${MXE_TARGET_ARCH}-w64-mingw32.${MXE_TARGET_LINK}${MXE_TARGET_THREAD}/share/cmake/mxe-conf.cmake ARG DEBIAN_FRONTEND=noninteractive @@ -84,7 +86,7 @@ RUN \ # Configure "settings.mk" required to build MXE # cd /usr/src/mxe && \ - echo "MXE_TARGETS := ${MXE_TARGET_ARCH}-w64-mingw32.static${MXE_TARGET_THREAD}" > settings.mk && \ + echo "MXE_TARGETS := ${MXE_TARGET_ARCH}-w64-mingw32.${MXE_TARGET_LINK}${MXE_TARGET_THREAD}" > settings.mk && \ echo "LOCAL_PKG_LIST := cc cmake" >> settings.mk && \ echo ".DEFAULT local-pkg-list:" >> settings.mk && \ echo "local-pkg-list: \$(LOCAL_PKG_LIST)" >> settings.mk && \ @@ -107,11 +109,11 @@ RUN \ # cd /usr/bin && \ rm cmake cpack && \ - ln -s /usr/src/mxe/usr/bin/${MXE_TARGET_ARCH}-w64-mingw32.static${MXE_TARGET_THREAD}-cmake cmake && \ - ln -s /usr/src/mxe/usr/bin/${MXE_TARGET_ARCH}-w64-mingw32.static${MXE_TARGET_THREAD}-cpack cpack + ln -s /usr/src/mxe/usr/bin/${MXE_TARGET_ARCH}-w64-mingw32.${MXE_TARGET_LINK}${MXE_TARGET_THREAD}-cmake cmake && \ + ln -s /usr/src/mxe/usr/bin/${MXE_TARGET_ARCH}-w64-mingw32.${MXE_TARGET_LINK}${MXE_TARGET_THREAD}-cpack cpack ENV PATH ${PATH}:/usr/src/mxe/usr/bin -ENV CROSS_TRIPLE ${MXE_TARGET_ARCH}-w64-mingw32.static${MXE_TARGET_THREAD} +ENV CROSS_TRIPLE ${MXE_TARGET_ARCH}-w64-mingw32.${MXE_TARGET_LINK}${MXE_TARGET_THREAD} ENV AS=/usr/src/mxe/usr/bin/${CROSS_TRIPLE}-as \ AR=/usr/src/mxe/usr/bin/${CROSS_TRIPLE}-ar \ CC=/usr/src/mxe/usr/bin/${CROSS_TRIPLE}-gcc \ diff --git a/windows-x64-posix/Dockerfile.in b/windows-x64-posix/Dockerfile.in index f4b5cc3..a51f911 100644 --- a/windows-x64-posix/Dockerfile.in +++ b/windows-x64-posix/Dockerfile.in @@ -4,6 +4,7 @@ MAINTAINER Matt McCormick "matt.mccormick@kitware.com" ENV WINEARCH win64 ARG MXE_TARGET_ARCH=x86_64 ARG MXE_TARGET_THREAD=.posix +ARG MXE_TARGET_LINK=static #include "common.windows" diff --git a/windows-x64/Dockerfile.in b/windows-x64/Dockerfile.in index 182d082..ad55d3e 100644 --- a/windows-x64/Dockerfile.in +++ b/windows-x64/Dockerfile.in @@ -4,6 +4,7 @@ MAINTAINER Matt McCormick "matt.mccormick@kitware.com" ENV WINEARCH win64 ARG MXE_TARGET_ARCH=x86_64 ARG MXE_TARGET_THREAD= +ARG MXE_TARGET_LINK=static #include "common.windows" diff --git a/windows-x86/Dockerfile.in b/windows-x86/Dockerfile.in index 92f2341..94bbec9 100644 --- a/windows-x86/Dockerfile.in +++ b/windows-x86/Dockerfile.in @@ -4,6 +4,7 @@ MAINTAINER Matt McCormick "matt.mccormick@kitware.com" ENV WINEARCH win32 ARG MXE_TARGET_ARCH=i686 ARG MXE_TARGET_THREAD= +ARG MXE_TARGET_LINK=static #include "common.windows"