Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing CMake for Windows in Wine without a GUI

Installing CMake for Windows in Wine without a GUI

Steps

  1. Set and export shell variables

    These variables are for our convenience:

    MYPREFIX=cmaketest
    CMAKEVER=3.17.3
    MSIFILE=cmake-$CMAKEVER-win64-x64.msi

    These are needed by winetricks and wine; they must be exported:

    export WINE_PREFIXES=/mnt/pfx
    export WINEARCH=win64
    export WINEPREFIX="$WINE_PREFIXES/$MYPREFIX"
  2. Create and configure a new wineprefix

    wineboot -i
    winetricks -q prefix=$MYPREFIX win10
  3. Download CMake

    wget https://github.com/Kitware/CMake/releases/download/v$CMAKEVER/$MSIFILE
  4. Install CMake

    wineconsole msiexec -i $MSIFILE -q ADD_CMAKE_TO_PATH=System

Relevant links

CMake download page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.