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. Which QMAKE variable contains the final library being build?

Which QMAKE variable contains the final library being build?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
qmake variables
6 Posts 3 Posters 732 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.
  • T Offline
    T Offline
    ThisIsEusch
    wrote on last edited by
    #1

    Which QMAKE variable contains the final library being build? Looking at the makefile generated by qmake I find:

    debug\apu_a.lib:  $(OBJECTS)
    

    Which variable in the qmake .pro holds the value debug\apu_a.lib?

    jsulmJ 1 Reply Last reply
    0
    • T ThisIsEusch

      Which QMAKE variable contains the final library being build? Looking at the makefile generated by qmake I find:

      debug\apu_a.lib:  $(OBJECTS)
      

      Which variable in the qmake .pro holds the value debug\apu_a.lib?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @ThisIsEusch said in Which QMAKE variable contains the final library being build?:

      Which variable

      TARGET
      https://doc.qt.io/qt-5/qmake-variable-reference.html#target

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        ThisIsEusch
        wrote on last edited by
        #3

        The TARGET variable indicates which target is to be build. If I build a debug configuration of TARGET=apu and template=lib, the resulting makefile contains a dependency debug/apu.lib: ..... which is the variable I'm looking for: the one that holds the path to the target on disk.

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

          Hi,

          I do not think there's any specific variable containing that. The path is likely built at generation time from various information.

          Why do you need that precise path for ?

          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
          • T Offline
            T Offline
            ThisIsEusch
            wrote on last edited by
            #5

            I have some "common" libraries (commons). These commons that are use in several projects (applications). During development the debug versions are used. Given release time, these commons are build in the release configuration (no debug info, no extra memory dumps, tracing etc) and checked into svn (version control). Using the revision number, the common libraries with their header are copied to the application folder (svn:externals). When commiting the folder properties including the value of svn:externals is stored. This way each released version of an application has a known set of commons.Switching between debug and release libraries is as easy as specifying another path to the libraries:

            CONFIG( debug, debug|release ) {
                    LIBS += -L..\common2\interface\libs\msc\debug
            }
            else {
                    LIBS += -L$$PWD\common\libs\msc\release
            }
            
            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              In that case you can use DESTDIR and TARGET. But ensure you use OUT_PWD so you ensure that your get the proper build folder to store the build artefact.

              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

              • Login

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