Bulding ddcui


  • The latest version of ddcutil (currently 0.9.9). If ddcutil is installed from pre-compiled packages, the shared library and development packages must be installed as well as the main ddcutil package.
  • A recent version of QT 5. ddcui will not build with versions of Qt older than 5.5. Unless you want to modify the the dialog boxes, or prefer the Qt Creator IDE, Qt Creator is not required.

Building Using qmake

  • A qmake control file (ddcui.pro) is provided.
  • To create the Makefile, change to the directory in which you wish to build ddcui and issue one of the commands:
  qmake -qt=qt5 <directory containing ddcui.pro>/ddcui.pro
  qtchooser -qt=5 -run-tool=qmake <directory containing ddcui.pro>/ddcui.pro

Note: The command make install using the makefile generated by qmake always installs files under directory /usr/local. If you need to change the installation prefix, use Cmake.

Building Using CMake

  • A CMake control file (CMakeLists.txt) is provided.
  • To create the Makefile, change to the directory in which you wish to build ddcui and issue the command:
   cmake <directory containing CMakeLists.txt> 
  • Using the -S and -B options can ensure that the proper directory is used for the build tree. See the cmake man page for detais.

Erasing file CMakeCache.txt and directory CMakeFiles from the build directory befure running cmake can avoid perplexing errors due to saved state. This has a negligable effect on cmake performance.

Using QtCreator

User arupda has written up notes on building ddcui using QtCreator and CMake. Note that arupda has modified the source to build with an earlier version of Qt.


  • If ddcutil is installed from the tarball using command make install, the PKGCONFIG file ddcutil.pc is installed in a subdirectory of /usr/local. Depending on Linux distribution, this subdirectory may or may not be in the default PKGCONFIG search path. For example, on Ubuntu it is in the search path, but on Fedora it is not. To add the relevant path, issue the command:
export PKG_CONFIG_PATH=/usr/local/share/pkgconfig

before running qmake or cmake.

To see the default PKGCONFIG search path, issue the command:

pkg-config --variable pc_path pkg-config

Generally speaking, if the ddcutil library and development files are installed under directory /usr instead of /usr/local tool path adjustments (often distribution specific) will be unnecessary. This will be the case if the files are installed from an rpm or dpkg package, or (if building ddcutil from source), ".configure" is run with argument "--prefix=/usr".

For additional information, Shared Library Configuration