Results 1 to 2 of 2

Thread: Conditional inclusion of a library path

  1. #1
    Join Date
    Apr 2014
    Posts
    53
    Thanks
    9

    Default Conditional inclusion of a library path

    Hi all.
    I am compiling my app for 2 platforms, Destop and Android. The app uses a library. Right now I specify double library paths like this:

    LIBS += -L/home/niko/wrkgr/intel/wrklib -L/home/niko/wrkgr/android/wrklib

    How would I mofify the config file so the library path is included depending on the build architecture ?

    something like:

    Qt Code:
    1. IF (INTEL) {
    2. LIBS += -L/home/niko/wrkgr/intel/wrklib
    3. ENDIF
    4.  
    5. IF (ANDROID_ARM) {
    6. LIBS += -L/home/niko/wrkgr/intel/wrklib
    7. }
    8.  
    9. IF (ANDROID_X86 {
    10. LIBS += -L/home/niko/wrkgr/intel/wrklib
    11. }
    To copy to clipboard, switch view to plain text mode 

    What is the correct syntax?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Conditional inclusion of a library path

    If you are referring to a QMake .pro file, maybe this will help
    http://doc.qt.io/qt-5/qmake-language...and-conditions

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    nuliknol (17th August 2016)

Similar Threads

  1. Replies: 6
    Last Post: 31st July 2012, 20:35
  2. Suggestion in library inclusion with rpath
    By jepessen in forum Newbie
    Replies: 2
    Last Post: 9th May 2011, 09:07
  3. Replies: 7
    Last Post: 22nd December 2010, 08:13
  4. how does Qt know the library path in LINUX
    By babu198649 in forum General Programming
    Replies: 1
    Last Post: 14th November 2008, 17:10
  5. MinGW Windows Library Search Path
    By zztop in forum Qt Programming
    Replies: 4
    Last Post: 26th March 2006, 15:18

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.