Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Writting OS indepedent LIB and DEPENDPATH variables.
QtWS25 Last Chance

Writting OS indepedent LIB and DEPENDPATH variables.

Scheduled Pinned Locked Moved Qt Creator and other tools
6 Posts 3 Posters 2.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pjmlp
    wrote on last edited by
    #1

    Hello,

    currently these variables have entries like build-AStarDemoLib-Desktop_Qt_5_3_0_MinGW_32bit-Debug and build-AStarDemoLib-Android_f_r_armeabi_v7a_GCC_4_8_Qt_5_3_0-Debug

    I have been hunting the qmake variable documentation, but I am kind of lost.

    Is there a way to build such values in an OS independent way with variables like, e.g. $(BUILD), $(CXX) and so forth?

    Thanks.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      qmake is innocent, it's Qt Creator that creates them.

      Look in the Preferences -> Build & Run -> General -> "Default build directory"

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jafarabadi.qt
        wrote on last edited by
        #3

        Hi pjmlp,
        comment of SGaist is useful if you want to change build path,
        in addition you can find other build variables in above path
        but if you want to add additional paths which is different in each OS, routine is different.

        1 Reply Last reply
        0
        • P Offline
          P Offline
          pjmlp
          wrote on last edited by
          #4

          Thanks guys, but my problem is how to properly do a multi-project in qmake in an OS independent way.

          When using other make tools, it is usually a matter of using the correct set of make variables so that the binaries and include files can be properly found.

          This is what I am looking for, what variables are available in qmake to achieve the same functionality when generating the makefile.

          The qmake variable list, didn't seem to provide such variables as I am used to.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            For OS specific stuff like rc file for Windows use scope

            @
            win32 {
            RC_FILE = mycoolsoft.rc
            }
            @

            The same goes for include path

            @
            unix {
            INCLUDEPATH += /usr/local/mycoollib/include
            LIBS += -L/usr/local/mycoollib/lib
            } else {
            INCLUDEPATH += C:/Code/mycoollib/include
            LIBS += C:/Code/mycoollib/lib
            }
            LIBS += -lmycoolib
            @

            Compilers don't need to be setup since it's already done for you.

            For more details and information, you can take a look at the "qmake manual" in Qt's documentation.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • P Offline
              P Offline
              pjmlp
              wrote on last edited by
              #6

              Thanks for your replies.

              I ended up sorting out the problem by disabling shadow builds.

              Now I don't have to care about specific OS pathnames on the paths for the libraries.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved