Bug 220813 - devel/qt5-core: qmake_build is required for non-qmake projects
Summary: devel/qt5-core: qmake_build is required for non-qmake projects
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-18 02:38 UTC by Yuri Victorovich
Modified: 2018-01-01 23:20 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (kde)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2017-07-18 02:38:22 UTC
net-im/qTox is a Qt5 project. It doesn't use qmake, but it uses CMAKE_AUTOMOC. For some reason, build fails without USE_QT5+=qmake_build:

> CMake Error at /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:15 (message):
>  The imported target "Qt5::Core" references the file
>     "/usr/local/lib/qt5/bin/qmake"
>  but this file does not exist.  Possible reasons include:
>  * The file was deleted, renamed, or moved to another location.
>  * An install or uninstall procedure did not complete successfully.
>  * The installation package was faulty and contained
>     "/usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"
>  but not all the files it references.

Qt5 should not require qmake_build when qmake isn't used. It should have moc_build or automoc_build or something like this.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2017-07-18 02:46:54 UTC
qTox update suffering from the problem: bug#220814
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2017-07-18 06:25:03 UTC
Hi Yuri

Even if a Qt5 project uses cmake to be built, it [almost] always also requires USE_QT5=qmake_build, as the cmake files shipped by Qt are just built this way (remember, QtBase is not supposed to be split, as it is in the ports tree).

I'm not sure if the price "having to add USE_QT5=qmake_build" is worth the effort to mess with Qt's cmake files.


mfg Tobias
Comment 3 Adriaan de Groot freebsd_committer freebsd_triage 2018-01-01 23:20:23 UTC
As tcberner@ says, the Qt-provided CMake modules (for Qt5) require qmake to be installed. If you really, really, want to avoid qmake in an otherwise Qt5-using port (remember, we're fighting against upstream to even allow qmake to be absent), you can use some CMake trickery in your own port:

add_executable(Qt5::qmake IMPORTED)
set_target_properties(Qt5::qmake PROPERTIES IMPORTED_LOCATION "/usr/bin/false")

That will prevent the Qt5 module from looking for qmake on its own. We don't think it's worth it to wrestle away qmake.