Bulding ddcui
Requirements
- ddcui 0.6.0 requires libddcutil from ddcutil version 2.2.0 or later.
If ddcutil is installed from pre-built packages, the shared library and development packages must be installed as well as the main ddcutil package. - cmake 3.15 or later
- A recent version of Qt 5, or Qt 6. Qt 5.5 or later, or Qt 6.1 or later.
- Unless you want to modify the the dialog boxes, or prefer the Qt Creator IDE, Qt Creator is not required.
Building Using CMake
ddcui can be built 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.
Options | Default | Purpose |
---|---|---|
USE_QT6 | OFF | Build with Qt6 instead of Qt5 |
USE_CCACHE | ON | Use ccache to speed up builds |
ASAN | OFF | Build to run with ASAN. n. libddcutil must also be built with ASAN |
DDCUTIL_PROJECT_DIR | OFF | Root directory of ddcutil project, enables ddcui to use libddcutil from that directory |
If DDUTIL_PROJECT_DIR is specified, libddcutil library and header files are taken from that directory, and do not need to be installed in /usr or /usr/local.
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.
Building Using qmake
qmake is no longer supported.
Issues:
- 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