Re: [CMake] Using Qt5 with CMake

2014-03-15 Thread Alan W. Irwin

Hi Steve:

If you remember my OP, I don't (yet) have access to Qt5 myself, but
another PLplot developer does, and after I changed the Qt relevant
part of our build system following the helpful advice I got on this
list, he was able to refine my work so that PLplot now produces good
"qt" PLplot device driver results for him with either Qt4 or Qt5.

We are very happy with those good build and run-time results for Qt5
that have been obtained by a combination of find_package,
qt5_use_modules, and qt5_wrap_cpp.  Furthermore, from the
documentation at
http://doc-snapshot.qt-project.org/qt5-stable/cmake-manual.html, it
appears this combination should work OK for CMake version 2.8.9 (our
minimum version) and above.  But the implication of that documentation
is that qt5_wrap_cpp is a rather dated approach (only mentioned in the
2.8.3 section of that documentation), and ultimately it would be
better to use the AUTOMOC target property instead for the relevant
targets.  However, that approach only seems to be mentioned for
CMake-2.8.11 section of the Qt5 CMake manual. Yet I double-checked the
actual documentation at
http://www.cmake.org/cmake/help/v2.8.9/cmake.html, and there does seem
to be an AUTOMOC target property available for 2.8.9.  So is that
property for that version of CMake not suitable for working with Qt5
as implied by the Qt5 CMake manual or could we safely move to the
AUTOMOC property approach even for our users that are still using
2.8.9? If the former is the case, then the part of the QT5 cmake
manual devoted to 2.8.9 needs to mention qt5_wrap_cpp, and if the
latter is the case that part of the manual needs to mention the
AUTOMOC property.

Of course, the question about qt5_wrap_cpp versus AUTOMOC property for
CMake-2.8.9 become moot once we update our minimum CMake version to
2.8.11, but that may be as much as a year away.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Using Qt5 with CMake

2014-03-12 Thread Stephen Kelly
Alan W. Irwin wrote:
>> Packages and targets know their dependencies so you don't have to.
> 
> Your statement appears to imply that QtSvg has a QtGui (and QtCore)
> dependency so I don't have to worry about those other components.

Correct. I suggest you create a project for experimentation such as this:

 find_package(Qt4 REQUIRED)
 find_package(Qt5Svg REQUIRED)
 add_executable(testexe main.cpp)
 target_link_libraries(testexe Qt4::QtSvg)
 #target_link_libraries(testexe Qt5::Svg)

and look at the verbose output.

Thanks,

Steve.


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Using Qt5 with CMake

2014-03-12 Thread Alan W. Irwin

Hi Steve:

Your answer was quite helpful, but I have one supplementary
question.

On 2014-03-12 09:34+0100 Stephen Kelly wrote:


Alan W. Irwin wrote:


(1) How should you replace

find_package(Qt4 4.8.2 COMPONENTS QtCore QtGui QtSvg)


find_package(Qt5 5.2.1 COMPONENTS Svg)

or

find_package(Qt5Svg 5.2.1)

Packages and targets know their dependencies so you don't have to.


Your statement appears to imply that QtSvg has a QtGui (and QtCore)
dependency so I don't have to worry about those other components.
That is great if true, but I need confirmation of that since I have
very little knowledge of the Qt components, and how they depend on
each other.  Note, we use Qt to produce plots in a very wide range of
non-interactive file formats as well using Qt to implement an
interactive Qt plotting device.  As far as I know QtSvg is required because one
of the file formats is SVG, and QtGui is required for the interactive
Qt-related device.  But I am quite surprised that the QtSvg component
depends on QtGui because I had always thought of the SVG standard as
being completely file oriented. So your confirmation of that
dependency would be appreciated.

By the way after re-reading the documentation at
http://doc-snapshot.qt-project.org/qt5-stable/cmake-manual.html, I
have decided not to use the "Using Qt 5 with CMake older than 2.8.9"
approach as I suggested earlier today. Instead, I will first try using
the qt5_use_modules approach (which is natural since the PLplot
minimum CMake version is already 2.8.9).

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Using Qt5 with CMake

2014-03-12 Thread Alan W. Irwin

On 2014-03-12 01:15-0400 Jean-Christophe Fillion-Robin wrote:


Hi Alan,

To get a better idea of the required change to support Qt5, you could look
at what we did for VTK. See
https://github.com/Kitware/VTK/commit/384636ec9f4

Hth
Jc


Hi Jean-Christophe:

Thanks!  That is a big help.  I notice, for example, that VTK decided to
use the "Using Qt 5 with CMake older than 2.8.9" approach.  I might
try that as well to start because it seems more understandable to me
than the alternative approaches that are also available with later
CMake versions which take advantage of new CMake infrastructure.

Alan




On Tue, Mar 11, 2014 at 4:59 PM, Alan W. Irwin wrote:


On 2014-01-26 17:36+0100 Stephen Kelly wrote:

 http://doc-snapshot.qt-project.org/qt5-stable/cmake-manual.html




To resurrect this slightly old thread, it has been years since I
implemented the Qt4 parts of the PLplot build system, and I haven't
looked much at the Qt components of our build system ever since.  So I
am basically starting again from virtually no knowlege concerning
CMake support for Qt to get the PLplot build system to find and use
the Qt5 components that it needs.  I am frankly somewhat lost trying
to use the above documentation which seems rather incomplete from my
perspective.  Another complicating factor at the moment is I don't
have access to Qt5 (running Debian stable) so, for now, I don't have a
chance to try some experiments to work things out, and others (who
have considerably less general knowledge than I do concerning the
PLplot build system) will be trying out what is recommended here
instead of me.

So here are some specific questions related to PLplot's future Qt5 needs.

(1) How should you replace

find_package(Qt4 4.8.2 COMPONENTS QtCore QtGui QtSvg)

and

qt4_wrap_cpp(
  QT_MOC_OUTFILES
  ${CMAKE_SOURCE_DIR}/include/qt.h
  OPTIONS ${MOC_OPTIONS}
  )

(the two key commands the PLplot build system currently uses for Qt4)
with the new cmake finding infrastructure documented above?
(MOC_OPTIONS are some macros we set to control including or dropping
various parts of the PLplot qt.h header file.)

(2) PLplot currently does not use include(${QT_USE_FILE}) since in my
view that directory property approach is too blunt an instrument that
tends to contaminate the large parts of the PLplot build that have
nothing to do with Qt with all the Qt-related compiler flags. Instead,
we use the alternative approach of simply setting the appropriate Qt
compile flags for our specific Qt-related source files.  Does Qt5
still use that directory property apprach for setting compile flags
or is this no longer an issue?

(3) Our current alternative to include(${QT_USE_FILE}) still sets
QT_LIBRARIES.  That allows us to link one of the key PLplot Qt-related
libraries
as follows:

target_link_libraries(
  plplotqt${LIB_TAG}
  plplot${LIB_TAG}
  ${MATH_LIB}
  ${QT_LIBRARIES}
  )

How should that command be replaced for the new Qt5 way of doing
things?

It appears from the above documentation that the new Qt5 find and use
methods are quite dependent on CMake version so assume for the
purposes of this question that our build system will force the PLplot
user to use CMake version 2.8.11 or higher by the time we have this
all debugged.

Thanks in advance for any help you can give with the specific
questions above for converting a project such as PLplot that currently
uses Qt4 to one that uses Qt5.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/
opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake





--
+1 919 869 8849



__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net)

Re: [CMake] Using Qt5 with CMake

2014-03-12 Thread Stephen Kelly
Alan W. Irwin wrote:

> (1) How should you replace
> 
> find_package(Qt4 4.8.2 COMPONENTS QtCore QtGui QtSvg)

 find_package(Qt5 5.2.1 COMPONENTS Svg)

or 

 find_package(Qt5Svg 5.2.1)

Packages and targets know their dependencies so you don't have to.

> and
> 
> qt4_wrap_cpp(
>QT_MOC_OUTFILES
>${CMAKE_SOURCE_DIR}/include/qt.h
>OPTIONS ${MOC_OPTIONS}
>)

qt5_wrap_cpp(
   QT_MOC_OUTFILES
   ${CMAKE_SOURCE_DIR}/include/qt.h
   OPTIONS ${MOC_OPTIONS}
   )

Though you can port to AUTOMOC before/after porting to Qt 5 too.

> Does Qt5
> still use that directory property apprach for setting compile flags
> or is this no longer an issue?

Qt 5 provides IMPORTED targets which have the compile flags encoded in them. 
The flags are consumed by target_link_libraries.

 http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html

 target_link_libraries(foo Qt5::Svg)

Qt4 provides IMPORTED targets too, so you can already use those before 
porting to Qt 5 instead of whatever mechanism you currently use.

 target_link_libraries(foo Qt4::QtSvg)

 http://www.cmake.org/cmake/help/v3.0/manual/cmake-qt.7.html

> target_link_libraries(
>plplotqt${LIB_TAG}
>plplot${LIB_TAG}
>${MATH_LIB}
>${QT_LIBRARIES}
>)
> 
> How should that command be replaced for the new Qt5 way of doing
> things?

I recommend listing the IMPORTED target 'leaf' dependencies.

target_link_libraries(
   plplotqt${LIB_TAG}
   plplot${LIB_TAG}
   ${MATH_LIB}
   Qt4::QtSvg
   # Qt5::Svg
   )

You can use 

 set(QT_LIBRARIES Qt4::QtSvg)

either, but I recommend using the target names directly.

Thanks,

Steve.


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Using Qt5 with CMake

2014-03-11 Thread Jean-Christophe Fillion-Robin
Hi Alan,

To get a better idea of the required change to support Qt5, you could look
at what we did for VTK. See
https://github.com/Kitware/VTK/commit/384636ec9f4

Hth
Jc


On Tue, Mar 11, 2014 at 4:59 PM, Alan W. Irwin wrote:

> On 2014-01-26 17:36+0100 Stephen Kelly wrote:
>
>  http://doc-snapshot.qt-project.org/qt5-stable/cmake-manual.html
>>
>
> To resurrect this slightly old thread, it has been years since I
> implemented the Qt4 parts of the PLplot build system, and I haven't
> looked much at the Qt components of our build system ever since.  So I
> am basically starting again from virtually no knowlege concerning
> CMake support for Qt to get the PLplot build system to find and use
> the Qt5 components that it needs.  I am frankly somewhat lost trying
> to use the above documentation which seems rather incomplete from my
> perspective.  Another complicating factor at the moment is I don't
> have access to Qt5 (running Debian stable) so, for now, I don't have a
> chance to try some experiments to work things out, and others (who
> have considerably less general knowledge than I do concerning the
> PLplot build system) will be trying out what is recommended here
> instead of me.
>
> So here are some specific questions related to PLplot's future Qt5 needs.
>
> (1) How should you replace
>
> find_package(Qt4 4.8.2 COMPONENTS QtCore QtGui QtSvg)
>
> and
>
> qt4_wrap_cpp(
>   QT_MOC_OUTFILES
>   ${CMAKE_SOURCE_DIR}/include/qt.h
>   OPTIONS ${MOC_OPTIONS}
>   )
>
> (the two key commands the PLplot build system currently uses for Qt4)
> with the new cmake finding infrastructure documented above?
> (MOC_OPTIONS are some macros we set to control including or dropping
> various parts of the PLplot qt.h header file.)
>
> (2) PLplot currently does not use include(${QT_USE_FILE}) since in my
> view that directory property approach is too blunt an instrument that
> tends to contaminate the large parts of the PLplot build that have
> nothing to do with Qt with all the Qt-related compiler flags. Instead,
> we use the alternative approach of simply setting the appropriate Qt
> compile flags for our specific Qt-related source files.  Does Qt5
> still use that directory property apprach for setting compile flags
> or is this no longer an issue?
>
> (3) Our current alternative to include(${QT_USE_FILE}) still sets
> QT_LIBRARIES.  That allows us to link one of the key PLplot Qt-related
> libraries
> as follows:
>
> target_link_libraries(
>   plplotqt${LIB_TAG}
>   plplot${LIB_TAG}
>   ${MATH_LIB}
>   ${QT_LIBRARIES}
>   )
>
> How should that command be replaced for the new Qt5 way of doing
> things?
>
> It appears from the above documentation that the new Qt5 find and use
> methods are quite dependent on CMake version so assume for the
> purposes of this question that our build system will force the PLplot
> user to use CMake version 2.8.11 or higher by the time we have this
> all debugged.
>
> Thanks in advance for any help you can give with the specific
> questions above for converting a project such as PLplot that currently
> uses Qt4 to one that uses Qt5.
>
> Alan
> __
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __
>
> Linux-powered Science
> __
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
+1 919 869 8849
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://

Re: [CMake] Using Qt5 with CMake

2014-03-11 Thread Alan W. Irwin

On 2014-01-26 17:36+0100 Stephen Kelly wrote:


http://doc-snapshot.qt-project.org/qt5-stable/cmake-manual.html


To resurrect this slightly old thread, it has been years since I
implemented the Qt4 parts of the PLplot build system, and I haven't
looked much at the Qt components of our build system ever since.  So I
am basically starting again from virtually no knowlege concerning
CMake support for Qt to get the PLplot build system to find and use
the Qt5 components that it needs.  I am frankly somewhat lost trying
to use the above documentation which seems rather incomplete from my
perspective.  Another complicating factor at the moment is I don't
have access to Qt5 (running Debian stable) so, for now, I don't have a
chance to try some experiments to work things out, and others (who
have considerably less general knowledge than I do concerning the
PLplot build system) will be trying out what is recommended here
instead of me.

So here are some specific questions related to PLplot's future Qt5 needs.

(1) How should you replace

find_package(Qt4 4.8.2 COMPONENTS QtCore QtGui QtSvg)

and

qt4_wrap_cpp(
  QT_MOC_OUTFILES
  ${CMAKE_SOURCE_DIR}/include/qt.h
  OPTIONS ${MOC_OPTIONS}
  )

(the two key commands the PLplot build system currently uses for Qt4)
with the new cmake finding infrastructure documented above?
(MOC_OPTIONS are some macros we set to control including or dropping
various parts of the PLplot qt.h header file.)

(2) PLplot currently does not use include(${QT_USE_FILE}) since in my
view that directory property approach is too blunt an instrument that
tends to contaminate the large parts of the PLplot build that have
nothing to do with Qt with all the Qt-related compiler flags. Instead,
we use the alternative approach of simply setting the appropriate Qt
compile flags for our specific Qt-related source files.  Does Qt5
still use that directory property apprach for setting compile flags
or is this no longer an issue?

(3) Our current alternative to include(${QT_USE_FILE}) still sets
QT_LIBRARIES.  That allows us to link one of the key PLplot Qt-related libraries
as follows:

target_link_libraries(
  plplotqt${LIB_TAG}
  plplot${LIB_TAG}
  ${MATH_LIB}
  ${QT_LIBRARIES}
  )

How should that command be replaced for the new Qt5 way of doing
things?

It appears from the above documentation that the new Qt5 find and use
methods are quite dependent on CMake version so assume for the
purposes of this question that our build system will force the PLplot
user to use CMake version 2.8.11 or higher by the time we have this
all debugged.

Thanks in advance for any help you can give with the specific
questions above for converting a project such as PLplot that currently
uses Qt4 to one that uses Qt5.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Using Qt5 with CMake

2014-01-27 Thread Michael Jackson
I think I stumbled on that through a google search but I was not sure if it was 
"Current" or not. I guess it is. Thanks

Mike Jackson

On Jan 26, 2014, at 11:36 AM, Stephen Kelly  wrote:

> Michael Jackson wrote:
> 
>> Any help would be much appreciated.
>> 
> 
> I assume you have read 
> 
> http://doc-snapshot.qt-project.org/qt5-stable/cmake-manual.html
> 
> and you need more help. What help do you need specifically?
> 
> Thanks,
> 
> Steve.
> 
> 
> -- 
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Using Qt5 with CMake

2014-01-26 Thread Stephen Kelly
Michael Jackson wrote:

> Any help would be much appreciated.
> 

I assume you have read 

 http://doc-snapshot.qt-project.org/qt5-stable/cmake-manual.html

and you need more help. What help do you need specifically?

Thanks,

Steve.


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Using Qt5 with cmake

2013-01-18 Thread Alexander Neundorf
On Friday 18 January 2013, Bogdan Cristea wrote:
> Le vendredi 18 janvier 2013 à 15:22 +, Laszlo Papp a écrit :
> > What is wrong about Stephen's post? It has been working for me in
> > several projects.
> 
> A line like this
> 
> find_package(Qt5Declarative)
> 
> generates a warning about missing FindQt5Declarative.cmake which is not
> provided by Qt5 nor cmake. Maybe I am missing something, but I am not
> able to use Qt5 with cmake following that post.

It should also warn you that you used neither the MODULE nor the NO_MODULE 
option (if your cmake is recent enough).

When using find_package() like you do, it first searches for a 
FindQt5Decl.cmake, and if it doesn't find one, it continues to search for a 
Qt5DeclConfig.cmake in a bunch of directories.

Qt5 installs Config.cmake files, so you should use
find_package(Qt5Decl CONFIG)
or
find_package(Qt5Decl NO_MODULE)
to make obvious what you are searching for.

So, it seems cmake did not find a Qt5DeclarativeConfig.cmake nor a 
Qt5Declarative-config.cmake file on your system.
Does such a file exist ?
If yes, you need to adjust the environment variable CMAKE_PREFIX_PATH to point 
to the install prefix of Qt5.

Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Using Qt5 with cmake

2013-01-18 Thread Bogdan Cristea
Le vendredi 18 janvier 2013 à 16:36 +0100, Stephen Kelly a écrit :
> 
> I'm afraid the post is a little but outdated. 
> 
> Qt5Declarative was renamed to QtQuick1 before the Qt 5 release, so try
> to 
> find that instead. 
> 
> I'll see about updating the blog post. 

Hi

I think that what is missing is this (taken from cmake manual of Qt5)

"The easiest way to use CMake is to set the CMAKE_PREFIX_PATH
environment variable to the install prefix of Qt 5."

regards
Bogdan

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Using Qt5 with cmake

2013-01-18 Thread Bogdan Cristea
Le vendredi 18 janvier 2013 à 15:31 +, Laszlo Papp a écrit :
> There is also this:
> http://qt-project.org/doc/qt-5.0/qtdoc/cmake-manual.html
> 
> Either way, check if your Qt installation ships the cmake files. Qt5
> has builtin support for third-party projects from cmake point of
> view. 

Yes, now it works. The link above is much more useful.

Bogdan

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Using Qt5 with cmake

2013-01-18 Thread Stephen Kelly
Bogdan Cristea wrote:

> Le vendredi 18 janvier 2013 à 15:22 +, Laszlo Papp a écrit :
>> What is wrong about Stephen's post? It has been working for me in
>> several projects.
> 
> A line like this
> 
> find_package(Qt5Declarative)
> 
> generates a warning about missing FindQt5Declarative.cmake which is not
> provided by Qt5 nor cmake. Maybe I am missing something, but I am not
> able to use Qt5 with cmake following that post.
> 

Hi,

I'm afraid the post is a little but outdated. 

Qt5Declarative was renamed to QtQuick1 before the Qt 5 release, so try to 
find that instead. 

I'll see about updating the blog post.

Thanks,

Steve.


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Using Qt5 with cmake

2013-01-18 Thread Laszlo Papp
There is also this: http://qt-project.org/doc/qt-5.0/qtdoc/cmake-manual.html

Either way, check if your Qt installation ships the cmake files. Qt5 has
builtin support for third-party projects from cmake point of view.

On Fri, Jan 18, 2013 at 3:29 PM, Bogdan Cristea  wrote:

> Le vendredi 18 janvier 2013 à 15:22 +, Laszlo Papp a écrit :
> > What is wrong about Stephen's post? It has been working for me in
> > several projects.
>
> A line like this
>
> find_package(Qt5Declarative)
>
> generates a warning about missing FindQt5Declarative.cmake which is not
> provided by Qt5 nor cmake. Maybe I am missing something, but I am not
> able to use Qt5 with cmake following that post.
>
> Bogdan
>
>
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Using Qt5 with cmake

2013-01-18 Thread Bogdan Cristea
Le vendredi 18 janvier 2013 à 15:22 +, Laszlo Papp a écrit :
> What is wrong about Stephen's post? It has been working for me in
> several projects.

A line like this

find_package(Qt5Declarative)

generates a warning about missing FindQt5Declarative.cmake which is not
provided by Qt5 nor cmake. Maybe I am missing something, but I am not
able to use Qt5 with cmake following that post.

Bogdan

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Using Qt5 with cmake

2013-01-18 Thread Laszlo Papp
What is wrong about Stephen's post? It has been working for me in several
projects.

On Fri, Jan 18, 2013 at 3:19 PM, Bogdan Cristea  wrote:

> Hi
>
> Qt5 provides configuration files for cmake, but I haven't yet found a
> way to detect Qt5 as recommended in this post (I am using qt5 on Windows
> with Visual Studio 2010):
>
> http://www.kdab.com/using-cmake-with-qt-5/
>
> As far as I understand cmake does not yet provide support for qt5 (at
> least not in 2.8.10.2). How can I add support for qt 5 in cmake ? Are
> there some examples of CMakeFiles for using Qt5 ?
>
> thanks
> Bogdan
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake