Results 1 to 7 of 7

Thread: How can we create .pc file automatically?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2007
    Posts
    6
    Thanks
    2

    Default Re: How can we create .pc file automatically?

    Quote Originally Posted by gustavosbarreto View Post
    Wrong.

    Try this:
    Qt Code:
    1. TEMPLATE = lib
    2. CONFIG += create_pc
    3.  
    4. HEADERS = thing.h
    5. SOURCES = thing.cpp
    6.  
    7. headers.path = /usr/include/yourlib
    8. headers.files = thing.h
    9.  
    10. target.path = /usr/lib
    11.  
    12. QMAKE_PKGCONFIG_NAME = yourlibname
    13. QMAKE_PKGCONFIG_DESCRIPTION = yourlib description
    14. QMAKE_PKGCONFIG_LIBDIR = $$target.path
    15. QMAKE_PKGCONFIG_INCDIR = $$headers.path
    16. QMAKE_PKGCONFIG_DESTDIR = pkgconfig
    To copy to clipboard, switch view to plain text mode 
    Sorry. I forgot it:

    Qt Code:
    1. TARGET = yourlibname
    2. INSTALLS += target headers
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Dec 2010
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default Re: How can we create .pc file automatically?

    TEMPLATE = lib
    INSTALLS += target headers
    TARGET =
    DEPENDPATH += .
    INCLUDEPATH += . \
    /usr/include/myIncludes

    LIBS += -lmylibs


    # Input
    HEADERS += *.h
    SOURCES += *.cpp


    CONFIG += create_pc

    headers.path = /usr/include/spUtility
    headers.files = spUtility.h

    target.path = /usr/lib

    QMAKE_PKGCONFIG_NAME = spUtility
    QMAKE_PKGCONFIG_DESCRIPTION = spUtility is the utility lib for wrt service providers
    QMAKE_PKGCONFIG_LIBDIR = $$target.path
    QMAKE_PKGCONFIG_INCDIR = $$headers.path
    QMAKE_PKGCONFIG_DESTDIR = pkgconfig


    my .pro file looks like above , but in my current directory , i can see pkgconfig foder empty and i get an error while doing make install like this :

    install -m 644 -p "pkgconfig//utilities.pc" "/usr/lib/pkgconfig/utilities.pc"
    install: cannot stat `pkgconfig//utilities.pc': No such file or directory
    make: [install_target] Error 1 (ignored)
    install -m 644 -p /home/rakesh/trunk/wrt/serviceproviders/utilities/spUtility.h /usr/include/spUtility/

Similar Threads

  1. Replies: 5
    Last Post: 27th May 2009, 12:49
  2. Can't create folder if file with same name exists
    By Barry79 in forum Qt Programming
    Replies: 1
    Last Post: 6th May 2009, 16:33
  3. Check for invalid file name in QFileDialog
    By darren in forum Qt Programming
    Replies: 2
    Last Post: 7th November 2008, 14:43
  4. Create a file
    By bfr in forum Qt Programming
    Replies: 2
    Last Post: 29th January 2008, 07:27
  5. create file in another directory
    By raphaelf in forum Qt Programming
    Replies: 3
    Last Post: 16th February 2006, 10:04

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
  •  
Qt is a trademark of The Qt Company.