Discussion:
[LyX/master] Add QtMacExtras detection for Qt5 support
Kornel Benko
2014-08-21 16:58:24 UTC
Permalink
+ if(APPLE)
+ find_package(Qt5MacExtras)
+ elseif(UNIX)
+ find_package(Qt5X11Extras)
+ endif()
Why this? find_package(Qt5X11Extras) should determine, if QT
is built over X11.
This is platform independent.
We need it only for keytests.


Kornel
Stephan Witt
2014-08-21 17:31:24 UTC
Permalink
Post by Kornel Benko
+ if(APPLE)
+ find_package(Qt5MacExtras)
+ elseif(UNIX)
+ find_package(Qt5X11Extras)
+ endif()
Why this? find_package(Qt5X11Extras) should determine, if QT
is built over X11.
This is platform independent.
No, it doesn't break on other platforms.
But it complains about not being able to find X11 extras on a Mac.
Either the message is stupid or it is expected to not look for X11 on a Mac.
This is the message text:

CMake Warning at CMakeLists.txt:557 (find_package):
By not providing "FindQt5X11Extras.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5X11Extras", but CMake did not find one.

Could not find a package configuration file provided by "Qt5X11Extras" with
any of the following names:

Qt5X11ExtrasConfig.cmake
qt5x11extras-config.cmake

Add the installation prefix of "Qt5X11Extras" to CMAKE_PREFIX_PATH or set
"Qt5X11Extras_DIR" to a directory containing one of the above files. If
"Qt5X11Extras" provides a separate development package or SDK, be sure it
has been installed.
Post by Kornel Benko
We need it only for keytests.
No. For Mac builds it is needed to compile Mac extras dependencies like QMacStyle.
I cannot say what is to do for Windows.

Stephan
Kornel Benko
2014-08-21 17:41:14 UTC
Permalink
Post by Stephan Witt
Post by Kornel Benko
+ if(APPLE)
+ find_package(Qt5MacExtras)
+ elseif(UNIX)
+ find_package(Qt5X11Extras)
+ endif()
Why this? find_package(Qt5X11Extras) should determine, if QT
is built over X11.
This is platform independent.
No, it doesn't break on other platforms.
But it complains about not being able to find X11 extras on a Mac.
Either the message is stupid or it is expected to not look for X11 on a Mac.
Yes, the message is unneeded. I *expect* it to fail, if Qt is not built over X11.
Post by Stephan Witt
By not providing "FindQt5X11Extras.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5X11Extras", but CMake did not find one.
Could not find a package configuration file provided by "Qt5X11Extras" with
Qt5X11ExtrasConfig.cmake
qt5x11extras-config.cmake
Add the installation prefix of "Qt5X11Extras" to CMAKE_PREFIX_PATH or set
"Qt5X11Extras_DIR" to a directory containing one of the above files. If
"Qt5X11Extras" provides a separate development package or SDK, be sure it
has been installed.
Post by Kornel Benko
We need it only for keytests.
No. For Mac builds it is needed to compile Mac extras dependencies like QMacStyle.
I cannot say what is to do for Windows.
You mean Qt5MacExtras here, don't you?

What I meant was
if(APPLE)
find_package(Qt5MacExtras)
endif()
find_package(Qt5X11Extras)

I can even live with
find_package(Qt5MacExtras)
find_package(Qt5X11Extras)
Post by Stephan Witt
Stephan
Kornel
Stephan Witt
2014-08-21 17:50:19 UTC
Permalink
Post by Kornel Benko
Post by Stephan Witt
Post by Kornel Benko
+ if(APPLE)
+ find_package(Qt5MacExtras)
+ elseif(UNIX)
+ find_package(Qt5X11Extras)
+ endif()
Why this? find_package(Qt5X11Extras) should determine, if QT
is built over X11.
This is platform independent.
No, it doesn't break on other platforms.
But it complains about not being able to find X11 extras on a Mac.
Either the message is stupid or it is expected to not look for X11 on a Mac.
Yes, the message is unneeded. I *expect* it to fail, if Qt is not built over X11.
Post by Stephan Witt
By not providing "FindQt5X11Extras.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5X11Extras", but CMake did not find one.
Could not find a package configuration file provided by "Qt5X11Extras" with
Qt5X11ExtrasConfig.cmake
qt5x11extras-config.cmake
Add the installation prefix of "Qt5X11Extras" to CMAKE_PREFIX_PATH or set
"Qt5X11Extras_DIR" to a directory containing one of the above files. If
"Qt5X11Extras" provides a separate development package or SDK, be sure it
has been installed.
Post by Kornel Benko
We need it only for keytests.
No. For Mac builds it is needed to compile Mac extras dependencies like QMacStyle.
I cannot say what is to do for Windows.
You mean Qt5MacExtras here, don't you?
What I meant was
if(APPLE)
find_package(Qt5MacExtras)
endif()
find_package(Qt5X11Extras)
But this would cause the mentioned message. I'd like to avoid it on Mac.
Post by Kornel Benko
I can even live with
find_package(Qt5MacExtras)
find_package(Qt5X11Extras)
Ditto.

Stephan
Kornel Benko
2014-08-21 17:54:34 UTC
Permalink
Post by Stephan Witt
Post by Kornel Benko
Post by Stephan Witt
Post by Kornel Benko
+ if(APPLE)
+ find_package(Qt5MacExtras)
+ elseif(UNIX)
+ find_package(Qt5X11Extras)
+ endif()
Why this? find_package(Qt5X11Extras) should determine, if QT
is built over X11.
This is platform independent.
No, it doesn't break on other platforms.
But it complains about not being able to find X11 extras on a Mac.
Either the message is stupid or it is expected to not look for X11 on a Mac.
Yes, the message is unneeded. I *expect* it to fail, if Qt is not built over X11.
Post by Stephan Witt
By not providing "FindQt5X11Extras.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5X11Extras", but CMake did not find one.
Could not find a package configuration file provided by "Qt5X11Extras" with
Qt5X11ExtrasConfig.cmake
qt5x11extras-config.cmake
Add the installation prefix of "Qt5X11Extras" to CMAKE_PREFIX_PATH or set
"Qt5X11Extras_DIR" to a directory containing one of the above files. If
"Qt5X11Extras" provides a separate development package or SDK, be sure it
has been installed.
Post by Kornel Benko
We need it only for keytests.
No. For Mac builds it is needed to compile Mac extras dependencies like QMacStyle.
I cannot say what is to do for Windows.
You mean Qt5MacExtras here, don't you?
What I meant was
if(APPLE)
find_package(Qt5MacExtras)
endif()
find_package(Qt5X11Extras)
But this would cause the mentioned message. I'd like to avoid it on Mac.
Post by Kornel Benko
I can even live with
find_package(Qt5MacExtras)
find_package(Qt5X11Extras)
Ditto.
I understood that. I wanted to get rid of platform dependencies in cmake code. If possible.
Post by Stephan Witt
Stephan
Kornel
Stephan Witt
2014-08-21 17:43:42 UTC
Permalink
Post by Stephan Witt
No. For Mac builds it is needed to compile Mac extras dependencies like QMacStyle.
I have to correct myself. QMacStyle is not available with Qt5 yet.
A correct example is e.g. QMacPasteboardMime.

Stephan
Kornel Benko
2014-08-21 17:50:41 UTC
Permalink
Post by Stephan Witt
Post by Stephan Witt
No. For Mac builds it is needed to compile Mac extras dependencies like QMacStyle.
I have to correct myself. QMacStyle is not available with Qt5 yet.
A correct example is e.g. QMacPasteboardMime.
Stephan
OK.

We could also try to use QUIET.

find_package(somepackage QUIET)

Kornel
Stephan Witt
2014-08-21 19:49:21 UTC
Permalink
Post by Kornel Benko
Post by Stephan Witt
Post by Stephan Witt
No. For Mac builds it is needed to compile Mac extras dependencies like QMacStyle.
I have to correct myself. QMacStyle is not available with Qt5 yet.
A correct example is e.g. QMacPasteboardMime.
Stephan
OK.
We could also try to use QUIET.
find_package(somepackage QUIET)
This would work too. Change it if you prefer this version.
I'd never came up with this solution. Too less cmake knowledge.
Post by Kornel Benko
Post by Stephan Witt
Post by Stephan Witt
I can even live with
find_package(Qt5MacExtras)
find_package(Qt5X11Extras)
Ditto.
I understood that. I wanted to get rid of platform dependencies in cmake code. If possible.
I'm a fan of it too. But this file looks like a hard case…

Stephan
Kornel Benko
2014-08-22 07:43:03 UTC
Permalink
Post by Stephan Witt
Post by Kornel Benko
Post by Stephan Witt
Post by Stephan Witt
No. For Mac builds it is needed to compile Mac extras dependencies like QMacStyle.
I have to correct myself. QMacStyle is not available with Qt5 yet.
A correct example is e.g. QMacPasteboardMime.
Stephan
OK.
We could also try to use QUIET.
find_package(somepackage QUIET)
This would work too. Change it if you prefer this version.
I'd never came up with this solution. Too less cmake knowledge.
Post by Kornel Benko
Post by Stephan Witt
Post by Stephan Witt
I can even live with
find_package(Qt5MacExtras)
find_package(Qt5X11Extras)
Ditto.
I understood that. I wanted to get rid of platform dependencies in cmake code. If possible.
I'm a fan of it too. But this file looks like a hard case

Stephan
I tried wit QUIET, and I definitely don't have Qt5MacExtras. No messages about missing anything.
So, if you too don't get these message anymore, please change.

Kornel

Loading...