Results 1 to 4 of 4

Thread: QMake for non-qt projects

  1. #1
    Join Date
    Sep 2009
    Posts
    30
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default QMake for non-qt projects

    In order to better understand the QMake .pro files, I'm "porting" the flac source code to build by using qmake. So far, all is good, but in the generated makefiles, there are some hard-baked references to Qt, which I'd like to (automatically) get rid of. I understand QMake is a Qt tool, but I like the simplicity and cross-platformishness of it.

    In my project file, I have (among other things like target and headers and stuff):
    CONFIG -= QT
    QT -= core gui
    ...

    There are still references in the generated makefile to Qt stuff:
    DEFINES = -DQT_LARGEFILE_SUPPORT
    INCPATH = -I"..\Qt\mkspecs\default"
    QMAKE = m:\Development\x64\Qt\bin\qmake.exe
    IDC = m:\Development\x64\Qt\bin\idc.exe
    and then: references to yacc, zip, qt mkspecs, qmaketarget, while this should all be taken care of in the qmake (projectfile).pro step and translated to independent commands, right? If there's no Qt stuff in the project, Qt commands should be left out, or am I doing something wrong?

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QMake for non-qt projects

    Quote Originally Posted by rubenvb View Post
    There are still references in the generated makefile to Qt stuff:
    DEFINES = -DQT_LARGEFILE_SUPPORT
    This is just a define.
    INCPATH = -I"..\Qt\mkspecs\default"
    This is not reference to Qt but to QMake.

    QMAKE = m:\Development\x64\Qt\bin\qmake.exe
    Same here.

    IDC = m:\Development\x64\Qt\bin\idc.exe
    I have never seen that.

    and then: references to yacc, zip, qt mkspecs, qmaketarget, while this should all be taken care of in the qmake (projectfile).pro step and translated to independent commands, right?
    They are never used so nothing to worry here. You can probably turn that off by passing "CONFIG -= lex" or similar.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2009
    Posts
    30
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QMake for non-qt projects

    Thanks for the answer!
    OK, the define's just a define, no biggie, but the reference to qmake troubles me. Will it be possible to run qmake on my pc and generate, say an msvc makefile, zip the whole thing, transfer to another pc (without any part of Qt installed), unzip and run nmake on that makefile to build the project?
    I'll look into the CONFIG -= lex and others to see if they help.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QMake for non-qt projects

    Quote Originally Posted by rubenvb View Post
    Will it be possible to run qmake on my pc and generate, say an msvc makefile, zip the whole thing, transfer to another pc (without any part of Qt installed), unzip and run nmake on that makefile to build the project?
    I can't guarantee that. But I think that's unlikely (you might need QMake itself). That's not what QMake is for. You might try cmake instead although I think it also has some dependencies so without having cmake itself compilation will probably not work (as cmake is called back from the Makefile, AFAIK).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QMake Project Files....
    By TemporalBeing in forum Qt Programming
    Replies: 2
    Last Post: 6th May 2009, 16:15
  2. qmake sux a lot
    By singermornings in forum Qt Programming
    Replies: 6
    Last Post: 29th January 2009, 08:33
  3. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  4. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  5. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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.