Results 1 to 6 of 6

Thread: Anyone have a .cmake file for qwt 6.0.1 that works under windows?

  1. #1
    Join Date
    May 2012
    Location
    Earth
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Anyone have a .cmake file for qwt 6.0.1 that works under windows?

    Hello.

    I successfully installed qwt 6.0.1 and ran some examples. Now, I wanted to configure my cmake based project to use qwt under windows (win xp, using MSVC 2008). Unfortunably, qwt doesn't provide a .cmake configuration file (so I can't just find_package(qwt)).
    I searched on google for a .cmake file for qwt, but all such files I could find were either outdated or only for Linux/Unix.

    So, how do I use qwt with cmake?

    Sincerely yours,

    Sarah

  2. #2
    Join Date
    May 2012
    Location
    Earth
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Anyone have a .cmake file for qwt 6.0.1 that works under windows?

    I just added

    include_directories(C:/Qwt-6.0.1/include)
    link_directories(C:/Qwt-6.0.1/lib)

    and added 'qwtd' to target_link_libraries in my CMakeLists.txt.
    It works, but this way I'll have to replace qwtd with qwt when I change from debug to release.

  3. #3
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,318
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Anyone have a .cmake file for qwt 6.0.1 that works under windows?

    You also have to add the QWT_DLL define !

    I recommend to read qwt.prf ( and its includes ) to find out what needs to be set for building a Qwt application.

    Uwe

  4. #4
    Join Date
    May 2012
    Location
    Earth
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Anyone have a .cmake file for qwt 6.0.1 that works under windows?

    Quote Originally Posted by Uwe View Post
    You also have to add the QWT_DLL define !
    As I mentioned, I added 'qwtd' to target_link_libraries, which seems to be enough.

    Quote Originally Posted by Uwe View Post
    I recommend to read qwt.prf ( and its includes ) to find out what needs to be set for building a Qwt application.
    Been there, done that, seems like I added all I need.
    My project compiles fine and works like it should.

  5. #5
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,318
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Anyone have a .cmake file for qwt 6.0.1 that works under windows?

    Quote Originally Posted by SarahMiller View Post
    As I mentioned, I added 'qwtd' to target_link_libraries, which seems to be enough.
    No - QWT_DLL is necessary , otherwise you compile your code with the wrong import/export declarations.
    You would notice the problem when trying to start your application with some mysterious error.

    Uwe

  6. #6
    Join Date
    Jun 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Anyone have a .cmake file for qwt 6.0.1 that works under windows?

    Hi,

    how to define QWT_DLL in a CMakeLists.txt file, please ?
    Qwt compile fine by mean of qmake .pro file, as well as the examples, but I failed to build any program or library (deriving some qwt classes) using cmake on Windows with msvc ...

    Thank you

Similar Threads

  1. CMake fails on Windows 7 64-bit
    By IndigoJo in forum Qt Programming
    Replies: 5
    Last Post: 12th September 2011, 21:15
  2. CMake and Qt on Windows using MinGW
    By woodtluk in forum General Discussion
    Replies: 1
    Last Post: 26th December 2010, 19:04
  3. Generating .pro files from vcproj file or CMake file
    By ramazangirgin in forum Qt Programming
    Replies: 2
    Last Post: 17th February 2009, 09:37
  4. CMake Windows console issue
    By IndigoJo in forum Qt Programming
    Replies: 0
    Last Post: 23rd March 2008, 22:12
  5. Qt with cmake on windows xp
    By Ashish in forum Newbie
    Replies: 1
    Last Post: 6th October 2006, 22:59

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.