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. qmake install appears to ignore variables?
Forum Updated to NodeBB v4.3 + New Features

qmake install appears to ignore variables?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 328 Views 1 Watching
  • 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.
  • J Offline
    J Offline
    Jason_C
    wrote on 2 Sept 2019, 11:26 last edited by Jason_C 9 Feb 2019, 11:26
    #1

    I have a makefile containing:

    build: directories
    	qmake -o build/Makefile project.pro
    	make -C build -j8
    
    builddbg: directories
    	qmake -o build/Makefile project.pro debug=1 
    	make -C build -j8
    
    install: build
    	make -C build install
    

    and in project.pro I have the following conditional test:

    defined(debug, var) {
        warning ("***** debug build *****")
    
        # WITH-SYMBOLS
        QMAKE_CXXFLAGS += -Wall -ggdb
        QMAKE_CFLAGS += -Wall -Werror -ggdb 
        QMAKE_LFLAGS += -Wl,-Map=project.map
        CONFIG+=debug
    
    } else {
        warning (release build)
    
        # NO-SYMBOLS
        QMAKE_CFLAGS += -Wall -Werror 
    }
    

    make build followed by sudo make install works as expected.

    make builddbg produces the build containing the symbols, however submitting sudo make install the release build is produced and installed. The makefile in the build directory does indicate the variable in the header:

    #############################################################################
    # Makefile for building: .......
    # Generated by qmake (3.1) (Qt 5.10.1)
    # Project:  ../project.pro
    # Template: lib
    # Command: /usr/lib/qt5/bin/qmake -o Makefile ../project.pro debug=1
    #############################################################################
    

    Is there something I am missing, or is there a better way of switching between installing a project with symbols and installing without?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 2 Sept 2019, 17:40 last edited by
      #2

      Hi,

      You install target depends on your build target, hence it's going to build "build" and then install whatever is in the build folder.

      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

      1/2

      2 Sept 2019, 11:26

      • Login

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