CMakeLists.txt: no need to require whole Qt4

On Friday 12 March 2010 10:15:32 Konstantin Tokarev wrote:

  1. Qt4 is often provided as separate packages. I think it’s reasonable to
    require only core, gui, opengl. and network 2) Linguist: I think this
    dependency should be optional. if (for some reasons) linguist can’t be
    installed, english version could be compiled anyway 3) Feature request:
    ability to specify target language in CMake settings if user doesn’t want
    to build qm’s for other languages

I’m not CMake expert and I’m afraid to accidentally break something in
build system. Maybe Marcus or someone else can take a look?

I think you are misunderstanding the build system files, we only require the
relevant parts of Qt. See the calls made in avogadro/src/CMakeLists.txt and
its counterpart in libavogadro for example…

set(QT_USE_QTOPENGL true)
set(QT_USE_QTNETWORK true)

This is saying to turn on the requirement for the extra OpenGL and network
components we are using. You want to maintain compatibility with older
versions of CMake, so the more explicit (and newer) syntax cannot be used. If
I find some time I can look into when it was introduced, but we are already
(and have been for some time) doing what you ask.

Marcus

  1. Qt4 is often provided as separate packages. I think it’s reasonable to require only core, gui, opengl. and network
  2. Linguist: I think this dependency should be optional. if (for some reasons) linguist can’t be installed, english version could be compiled anyway
  3. Feature request: ability to specify target language in CMake settings if user doesn’t want to build qm’s for other languages

I’m not CMake expert and I’m afraid to accidentally break something in build system. Maybe Marcus or someone else can take a look?

Regards,
Konstantin

On Friday 12 March 2010 10:15:32 Konstantin Tokarev wrote:

  1. Qt4 is often provided as separate packages. I think it’s reasonable to
    require only core, gui, opengl. and network 2) Linguist: I think this
    dependency should be optional. if (for some reasons) linguist can’t be
    installed, english version could be compiled anyway 3) Feature request:
    ability to specify target language in CMake settings if user doesn’t want
    to build qm’s for other languages

I’m not CMake expert and I’m afraid to accidentally break something in
build system. Maybe Marcus or someone else can take a look?

I think you are misunderstanding the build system files, we only require the
relevant parts of Qt. See the calls made in avogadro/src/CMakeLists.txt and
its counterpart in libavogadro for example…

set(QT_USE_QTOPENGL true)
set(QT_USE_QTNETWORK true)

This is saying to turn on the requirement for the extra OpenGL and network
components we are using. You want to maintain compatibility with older
versions of CMake, so the more explicit (and newer) syntax cannot be used. If
I find some time I can look into when it was introduced, but we are already
(and have been for some time) doing what you ask.

Marcus

14.03.10, 19:28, “Marcus D. Hanwell” mhanwell@gmail.com:

On Friday 12 March 2010 10:15:32 Konstantin Tokarev wrote:

  1. Qt4 is often provided as separate packages. I think it’s reasonable to
    require only core, gui, opengl. and network 2) Linguist: I think this
    dependency should be optional. if (for some reasons) linguist can’t be
    installed, english version could be compiled anyway 3) Feature request:
    ability to specify target language in CMake settings if user doesn’t want
    to build qm’s for other languages

I’m not CMake expert and I’m afraid to accidentally break something in
build system. Maybe Marcus or someone else can take a look?
I think you are misunderstanding the build system files, we only require the
relevant parts of Qt. See the calls made in avogadro/src/CMakeLists.txt and
its counterpart in libavogadro for example…
set(QT_USE_QTOPENGL true)
set(QT_USE_QTNETWORK true)
This is saying to turn on the requirement for the extra OpenGL and network
components we are using. You want to maintain compatibility with older
versions of CMake, so the more explicit (and newer) syntax cannot be used. If
I find some time I can look into when it was introduced, but we are already
(and have been for some time) doing what you ask.

Thanks, I see
What about Linguist dependency? AFAIU it’s not optional now. Maybe current Avogadro could be built with older Qt which has no lconvert?


Regards,
Konstantin