I'm trying to build a piece of software on Ubuntu 20.04 LTS. The CMakeLists.txt has the following line:
find_package(Qt5 COMPONENTS Core Gui Widgets PrintSupport Multimedia MultimediaWidgets OpenGL SVG uitools REQUIRED)
All of my packages are up to date. I run cmake .
and I get:
CMake Warning (dev) in CMakeLists.txt: No project() command is present. The top-level CMakeLists.txt file must contain a literal, direct call to the project() command. Add a line of code such as project(ProjectName) near the top of the file, but after cmake_minimum_required(). CMake is pretending there is a "project(Project)" command on the first line.This warning is for project developers. Use -Wno-dev to suppress it.CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package): Could not find a package configuration file provided by "Qt5SVG" with any of the following names: Qt5SVGConfig.cmake qt5svg-config.cmake Add the installation prefix of "Qt5SVG" to CMAKE_PREFIX_PATH or set"Qt5SVG_DIR" to a directory containing one of the above files. If "Qt5SVG" provides a separate development package or SDK, be sure it has been installed.Call Stack (most recent call first): src/CMakeLists.txt:16 (find_package)
Earlier, I got a similar error with Qt Multimedia, which I simply fixed with:
sudo apt install qtmultimedia5-dev
Note that everything up to SVG works just fine. However, I've had no such luck installing Qt SVG. I've tried:
sudo apt install qttools5-dev libqt5svg5-devsudo apt install python3-pyqt5.qtsvg python3-pyqt5.qtsvg-dbg python3-pyside2.qtsvgsudo apt install git build-essential cmake qt5-default qtscript5-dev libssl-dev qttools5-dev qttools5-dev-tools qtmultimedia5-dev libqt5svg5-dev libqt5webkit5-dev libsdl2-dev libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack-jackd2-dev libxrandr-dev libqt5xmlpatterns5-dev libqt5xmlpatterns5 libqt5xmlpatterns5-private-devsudo apt install cmake cmake-gui libboost-date-time-dev libboost-dev libboost-filesystem-dev libboost-graph-dev libboost-iostreams-dev libboost-program-options-dev libboost-python-dev libboost-regex-dev libboost-serialization-dev libboost-thread-dev libcoin-dev libeigen3-dev libgts-bin libgts-dev libkdtree++-dev libmedc-dev libocct-data-exchange-dev libocct-ocaf-dev libocct-visualization-dev libopencv-dev libproj-dev libpyside2-dev libqt5opengl5-dev libqt5svg5-dev qtwebengine5-dev libqt5x11extras5-dev libqt5xmlpatterns5-dev libshiboken2-dev libspnav-dev libvtk7-dev libx11-dev libxerces-c-dev libzipios++-dev occt-draw pyside2-tools python3-dev python3-matplotlib python3-packaging python3-pivy python3-ply python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtsvg python3-pyside2.qtwidgets python3-pyside2.qtnetwork python3-pyside2.qtwebengine python3-pyside2.qtwebenginecore python3-pyside2.qtwebenginewidgets python3-pyside2.qtwebchannel python3-markdown python3-git qtbase5-dev qttools5-dev swig libyaml-cpp-dev
So I've installed the dependency. I also tried installing anything used in nearly any online solution to this problem in hopes that somehow one of the other dependencies was also required. Still no luck.
If I remove SVG, then CMake fails to find uitools
with the same error. Note that I installed uitools above, too. CMake still can't find it.
What is going on here? How do I even go about debugging this? I.e, where is CMake even looking?