Skip to content

crosscompiling using mingw

Hleb Valoshka edited this page Dec 26, 2021 · 5 revisions
export CC=i686-w64-mingw32-gcc
export CXX=i686-w64-mingw32-g++
export RC=i686-w64-mingw32-windres
./bootstrap-vcpkg.sh -disableMetrics -useSystemBinaries
./vcpkg install--triplet=x86-mingw-dynamic opengl freetype eigen3 fmt libpng libjpeg-turbo lua libepoxy cspice
cmake -S$PWD -B/tmp/mingw -G Ninja \
  -DCMAKE_BUILD_TYPE=Release \
  -DENABLE_SPICE=OFF \
  -DENABLE_QT=OFF \
  -DENABLE_WIN=ON \
  -DENABLE_NLS=ON \
  -DCMAKE_SYSTEM_NAME=Windows \
  -DVCPKG_TARGET_TRIPLET=x86-mingw-dynamic \
  -DCMAKE_FIND_USE_CMAKE_SYSTEM_PATH=OFF \
  -DCMAKE_TOOLCHAIN_FILE=$vcpkg/scripts/buildsystems/vcpkg.cmake