Results 1 to 3 of 3

Thread: Installing headers

  1. #1
    Join Date
    Apr 2008
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Installing headers

    Hi,

    I have been trying to get qmake to install by headers for me using an install target. The following is what I have been able to get so far, but I cannot get the headers that are created by uic for installation.

    Qt Code:
    1. ALL_HEADERS = $${HEADERS} $${GENERATED_FILES}
    2.  
    3. devel.path = $${HEADER_DIR}
    4. devel.depends = compiler_uic_make_all
    5. devel.extra = -$(MKDIR) $${HEADER_DIR} && $(COPY_FILE) --parents $${ALL_HEADERS} $${HEADER_DIR} && cd $${HEADER_DIR} && chmod 644 $${ALL_HEADERS}
    6. devel.uninstall = -cd $${HEADER_DIR}; $(DEL_FILE) $${ALL_HEADERS}
    7. INSTALLS += devel
    To copy to clipboard, switch view to plain text mode 

    The problem is that $${GENERATED_FILES} is empty when this is run (before the uic compiler is loaded I'm assuming). Is there a way to have it not expanded until it is full? It's not in the Makefile, so it can't be put that late unfortunately.

    I'd like to use the .installs of devel, but that flattens the structure of the headers, which isn't what i want. cp has a --parents switch which (I'm guessing) does what I want. I was hoping if there was anything I can do to get this to work without using a bash script or something of the sort. Thank you.

    --MathStuf

  2. #2
    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: Installing headers

    Why install generated files?
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Installing headers

    @jpn : Maybe because some ui-based classes are meant to be exported.

    @MathStuf : this is a well-know limitation of qmake. It won't fill variables with non-existing pathes. Therefore, you have to run qmake a second time AFTER having generated these files via the make (or nmake, gmake, mingw32-make, whatsoever...) command.
    Current Qt projects : QCodeEdit, RotiDeCode

Similar Threads

  1. spaning the headers in the QTableView
    By ru_core in forum Qt Programming
    Replies: 6
    Last Post: 11th June 2013, 13:17
  2. deleting selected headers
    By ru_core in forum Qt Programming
    Replies: 3
    Last Post: 16th April 2008, 07:53
  3. How to make headers fixed sized? (QTableWidget)
    By macias in forum Qt Programming
    Replies: 4
    Last Post: 13th August 2007, 15:57
  4. Installing libs/headers with qmake
    By ghorwin in forum Qt Programming
    Replies: 2
    Last Post: 7th May 2007, 20:01
  5. [custom widget] What about private headers ?
    By lauranger in forum Qt Programming
    Replies: 3
    Last Post: 18th November 2006, 23:14

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.