Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Writting OS indepedent LIB and DEPENDPATH variables.

    Tools
    3
    6
    1716
    Loading More Posts
    • 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
      pjmlp last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • J
          jafarabadi.qt last edited by

          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 Reply Quote 0
          • P
            pjmlp last edited by

            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 Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              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 Reply Quote 0
              • P
                pjmlp last edited by

                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 Reply Quote 0
                • First post
                  Last post