mirror of
				https://github.com/bensuperpc/dockcross.git
				synced 2025-10-31 08:06:23 +01:00 
			
		
		
		
	 07e5aecff3
			
		
	
	07e5aecff3
	
	
	
		
			
			MXE now ships its own version of CMake that sources the toolchain file, etc. As suggested by their warning when sourcing the toolchain file, use it. This also results in updating GCC from 4.9 to 5.4.
		
			
				
	
	
		
			88 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			88 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
| FROM dockcross/base:latest
 | |
| MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
 | |
| 
 | |
| # WINE is used as an emulator for try_run and tests with CMake.
 | |
| # Other dependencies are from the listed MXE requirements:
 | |
| #   http://mxe.cc/#requirements
 | |
| # 'cmake' is omitted because it is installed from source in the base image
 | |
| RUN apt-get update && apt-get -y --force-yes install \
 | |
|   autoconf \
 | |
|   automake \
 | |
|   autopoint \
 | |
|   bash \
 | |
|   bison \
 | |
|   bzip2 \
 | |
|   flex \
 | |
|   gettext \
 | |
|   git \
 | |
|   g++ \
 | |
|   g++-multilib \
 | |
|   gperf \
 | |
|   intltool \
 | |
|   libffi-dev \
 | |
|   libgdk-pixbuf2.0-dev \
 | |
|   libtool-bin \
 | |
|   libltdl-dev \
 | |
|   libssl-dev \
 | |
|   libxml-parser-perl \
 | |
|   libc6-dev-i386 \
 | |
|   make \
 | |
|   openssl \
 | |
|   p7zip-full \
 | |
|   patch \
 | |
|   perl \
 | |
|   pkg-config \
 | |
|   python \
 | |
|   ruby \
 | |
|   scons \
 | |
|   sed \
 | |
|   unzip \
 | |
|   wget \
 | |
|   wine \
 | |
|   xz-utils
 | |
| # Set up wine
 | |
| RUN dpkg --add-architecture i386 && \
 | |
|   apt-get update && \
 | |
|   apt-get install -y wine32
 | |
| ENV WINEARCH win32
 | |
| RUN wine hostname
 | |
| 
 | |
| WORKDIR /usr/src
 | |
| # mxe master 2017-10-25
 | |
| RUN git clone https://github.com/mxe/mxe.git && \
 | |
|   cd mxe && \
 | |
|   git checkout 994ad47302e8811614b7eb49fc05234942b95b89
 | |
| WORKDIR /usr/src/mxe
 | |
| COPY settings.mk /usr/src/mxe/
 | |
| RUN make -j$(nproc)
 | |
| 
 | |
| ENV PATH ${PATH}:/usr/src/mxe/usr/bin
 | |
| ENV CROSS_TRIPLE i686-w64-mingw32.static
 | |
| 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 \
 | |
|     CPP=/usr/src/mxe/usr/bin/${CROSS_TRIPLE}-cpp \
 | |
|     CXX=/usr/src/mxe/usr/bin/${CROSS_TRIPLE}-g++ \
 | |
|     LD=/usr/src/mxe/usr/bin/${CROSS_TRIPLE}-ld
 | |
| 
 | |
| ENV DEFAULT_DOCKCROSS_IMAGE dockcross/windows-x86
 | |
| WORKDIR /work
 | |
| 
 | |
| ENV CMAKE_TOOLCHAIN_FILE /usr/src/mxe/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake
 | |
| RUN echo 'set(CMAKE_CROSSCOMPILING_EMULATOR "/usr/bin/wine")' >> ${CMAKE_TOOLCHAIN_FILE}
 | |
| RUN cd /usr/local/bin \
 | |
|   && rm cmake \
 | |
|   && ln -s /usr/src/mxe/usr/bin/i686-w64-mingw32.static-cmake cmake \
 | |
|   && ln -s /usr/src/mxe/usr/bin/i686-w64-mingw32.static-cpack cpack
 | |
| 
 | |
| # Build-time metadata as defined at http://label-schema.org
 | |
| ARG BUILD_DATE
 | |
| ARG IMAGE
 | |
| ARG VCS_REF
 | |
| ARG VCS_URL
 | |
| LABEL org.label-schema.build-date=$BUILD_DATE \
 | |
|       org.label-schema.name=$IMAGE \
 | |
|       org.label-schema.vcs-ref=$VCS_REF \
 | |
|       org.label-schema.vcs-url=$VCS_URL \
 | |
|       org.label-schema.schema-version="1.0"
 |