mkdir build-mingw && cd build-mingw TOOLCHAIN_PREFIX=i686-w64-mingw32 # check up the actual mingw prefix of your mingw installation cmake ../ -DCMAKE_SYSTEM_NAME ...