congard / nvidia-system-monitor-qt

Task Manager for Linux for Nvidia graphics cards
MIT License
161 stars 23 forks source link

CMake identifies wrong source directory using README installation instructions #15

Closed helioseven closed 3 years ago

helioseven commented 3 years ago

Using system:

Linux Mint 19.1 Linux kernel 4.15.0-136-generic cmake 3.10.2 qtdeclarative5-dev 5.9.5-0ubuntu1.1 nividia-smi 455.45.01

Steps to repro:

1) git clone https://github.com/congard/nvidia-system-monitor-qt 2) cd nvidia-system-monitor-qt 3) mkdir build 4) cmake -DCMAKE_BUILD_TYPE=Release -DIconPath=/usr/share/icons/hicolor/512x512/apps/nvidia-system-monitor-qt.png -B build -G "Unix Makefiles"

Error output:

CMake Error: The source directory "/mnt/Data/Repositories/nvidia-system-monitor-qt/build" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.

Description:

CMakeLists.txt obviously exists, but cmake is apparently looking for it in the wrong place and I can't figure out why. I tried adding an "-S ." parameter to the command to specify the local folder (repo root) as the source root, but no change in error output. You can copy CMakeLists.txt to the build folder obviously, at which point the command finds it, but then the paths are messed up and it can't find the source files and configure breaks. Alternatively you can change the -B parameter to just "." and configure completes successfully, but then the outputs dump to the repo root rather than the build folder and it's unclear what additional steps need to be taken to be able to continue with the last installation step.

congard commented 3 years ago

Have you tried updating CMake?

helioseven commented 3 years ago

Ugh, well the good news is the project builds as expected w/ version 3.20.0-rc2 of CMake.

For those following in my footsteps, the bad news is multiple CMake installations cause trouble; so if you're gonna download, build, and install the latest CMake source .tar.gz from CMake website, you'll want to uninstall the apt-get version of CMake (use purge and autoremove) first and then remove the newly built CMake version and let apt-get reinstall the version it wants when you're done.