whoozle / android-file-transfer-linux

Android File Transfer for Linux (and macOS!)
http://whoozle.github.io/android-file-transfer-linux/
GNU Lesser General Public License v2.1
1.47k stars 120 forks source link

Unknown CMake command "qt5_add_translation" #270

Closed haasn closed 3 years ago

haasn commented 3 years ago

I didn't find an existing issue for this so I decided to make one.

I installed the qt-devel meta-package (though that only pulled in qt4 development files). I already have all of the relevant qt5-devel packages installed, e.g.

Information for package libQt5Core-devel:
-----------------------------------------
Repository     : Main Repository (OSS)
Name           : libQt5Core-devel
Version        : 5.15.2-5.3
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 3.0 MiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : libqt5-qtbase-5.15.2-5.3.src
Summary        : Development files for the Qt5 core library
Description    : 
    Development files for the Qt5 core library.

Despite this, I get:

$ cmake -GNinja -H. -Bbuild -DCMAKE_BUILD_TYPE=Release
-- building for Linux
-- Checking for module 'fuse'
--   Package 'fuse', required by 'virtual:world', not found
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Found pybind11: /usr/include (found version "2.6.2" )
-- /home/nand/dev/android-file-transfer-linux/python
-- Found PythonInterp: /usr/bin/python3.8 (found version "3.8.8") 
-- Found PythonLibs: /usr/lib64/libpython3.8.so
-- LTO enabled
-- version: v4.2, base version: 
-- building with MTPZ support
-- Using Qt5
CMake Error at qt/CMakeLists.txt:60 (qt5_add_translation):
  Unknown CMake command "qt5_add_translation".

-- Configuring incomplete, errors occurred!
See also "/home/nand/dev/android-file-transfer-linux/build/CMakeFiles/CMakeOutput.log".
See also "/home/nand/dev/android-file-transfer-linux/build/CMakeFiles/CMakeError.log".

Worryingly, rg qt5_add_translation /usr /lib shows no hits on my system. What am I missing?

haasn commented 3 years ago

Solution: it was libqt5-linguist-devel, which I had to install extra. I suggest adding that to the list of packages to install in the README.

whoozle commented 3 years ago

added in c11df76b9102570816bb9f9e0c0024178094f4de, thanks!