Results 1 to 3 of 3

Thread: qmake, uic and moc output folders

  1. #1
    Join Date
    Jan 2007
    Location
    Augsburg, Germany
    Posts
    75
    Thanks
    4
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default qmake, uic and moc output folders

    Hello again, here is my next question

    My program is split into multiple directories, the structure looks like this:
    project.pro
    main.cpp
    settings/settings.pri
    settings/settingsdialog.cpp
    settings/settingsdialog.ui
    settings/pages/pages.pri
    settings/pages/generalpage.cpp
    settings/pages/generalpage.ui

    Now if I build the Makefile generated by qmake the "moc_*.cpp"'s and the "ui_*.h"'s are put into the main folders which requires scary includes like "../../ui_generalpage.h" in the subfolders.

    Is there a way to get "uic" and "moc" put the output files in the directories where their input source is?

    If there's a way doing that with subprojects instead of project includes without creating a static/dynamic lib for the subfolders please tell me

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake, uic and moc output folders

    Quote Originally Posted by gri View Post
    Is there a way to get "uic" and "moc" put the output files in the directories where their input source is?
    Try changing MOC_DIR, UI_DIR, RCC_DIR and OBJECTS_DIR variables.

    Quote Originally Posted by gri View Post
    If there's a way doing that with subprojects instead of project includes without creating a static/dynamic lib for the subfolders please tell me
    Instead of a .pro file with subdirs template, you can create one with app template that includes .pri files from subdirectories.

    But you can also consider switching to CMake.

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: qmake, uic and moc output folders

    INCLUDEPATH might also come in handy.
    J-P Nurmi

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.