Compiling QCAD from Sources

These instructions guide through the process of installing QCAD from sources on your platform. Please note that these instructions only cover one possible scenario for each platform. You may want to use another compiler or an alternative version of Qt, but you might have to change source code or project files to succeed.

Checking out the QCAD Sources

To check out the QCAD source code, please clone our git repository as follows:

git clone [email protected]:qcad/qcad.git qcad

Or (using HTTPs):

git clone https://github.com/qcad/qcad.git qcad

If you have any other modules, put them into the same directory as the cloned qcad directory above:

qcad
qcadpro
qcadxy

The procedure to compile the source code depends on the platform you are on:

Windows

  1. Download and install a C++ compiler, for example:
  2. Download and install Qt from qt.io (see supported platforms):
  3. If available, download and extract Teigha (e.g. Kernel_vc14_amd64md.zip and Drawings_vc14_amd64md.zip) into qcadpro/src/io/dwg/opendesign and copy OdActivationInfo to qcadpro/src/io/dwg/opendesign/ThirdParty/activation.
  4. Configure QCAD. Optional modules installed side-by-side with the qcad directory are configured automatically:
    cd c:\Users\me\qcad\qcad
    c:\Qt\Qt5.13.2\5.13\msvc2015_64\bin\qmake -r CONFIG+=ractivated
  5. Compile QCAD. For example on cygwin:

    nmake release

    Alternatively, you may want to use jom, an nmake clone which speeds up compilation significantly by using all available CPU cores.

  6. Launch QCAD. For example with:

    release\qcad.exe
  7. (Optional) For code signing, open certlm.msc, click on "Personal" folder, choose Action > All Tasks > Import and select P12 file to import.

macOS

  1. Download and install the latest version of XCode for your platform.
  2. Download and install Qt (see supported platforms):
    • Download for example the DMG online installer called qt-opensource-mac-x64-5.13.2.dmg
    • Open the DMG file and launch the installer inside.

    • Add the bin directory of the Qt installation to your PATH environment variable, for example:

      export PATH="/Users/me/opt/Qt5.13.2/5.13.2/clang_64/bin:$PATH"
  3. Configure QCAD:

    cd ~/qcad
    qmake -r CONFIG+=ractivated
  4. Compile QCAD:

    make release
  5. Launch QCAD:

    cd release
    ./QCAD.app/Contents/MacOS/QCAD

Linux

  1. Check that you have the following (including dependencies) installed:
    • gcc
    • make
    • libx11-dev
    • libxext-dev
    • libxrender-dev
    • Ubuntu:
      • libglu1-mesa-dev libfreetype6-dev libfontconfig1-dev libssl-dev libdbus-1-dev libsm-dev
    • OpenSUSE:
      • Mesa-devel dbus-1-devel libsm-devel glu-devel
    • Debian:
      • libglu1-mesa-dev libfreetype6-dev libfontconfig1-dev libssl-dev libdbus-1-dev libsm-dev gcc make libx11-dev libxext-dev libxrender-dev libglu1-mesa-dev libfreetype6-dev libfontconfig1-dev libssl-dev libdbus-1-dev libsm-dev qt5-qmake qt5-default libqt5svg5-dev libqt5script5 libqt5help5 libqt5designer5 libqt5scripttools5 qtscript5-dev qtxmlpatterns5-dev-tools libqt5xmlpatterns5 libqt5xmlpatterns5-dev libqt5designer5 python3-pyside2.qtuitools libqscintilla2-qt5-designer libqt5designer5 qttools5-dev qt5-image-formats-plugins qtwayland5 qtwayland5-dev-tools libqt5waylandclient5
  2. Download and install Qt (see supported platforms):
    • Download for example the online installer called qt-opensource-linux-x64-5.13.2.run
    • Run the installer.
    • Add the Qt bin directory to your PATH environment variable, for example:
      export PATH=~/opt/qt-everywhere-opensource-src-5.13.2/bin:$PATH
  3. Configure QCAD:

    cd ~/qcad
    qmake -r CONFIG+=ractivated
  4. Compile QCAD:

    make release
  5. Launch QCAD:

    cd release
    LD_LIBRARY_PATH=. ./qcad-bin