Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. Qt on BlackBerry and QNX
  4. Momentics: adding a global define to a buildconfiguration
QtWS25 Last Chance

Momentics: adding a global define to a buildconfiguration

Scheduled Pinned Locked Moved Qt on BlackBerry and QNX
2 Posts 1 Posters 3.6k 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.
  • C Offline
    C Offline
    codenode
    wrote on last edited by
    #1

    Hi,

    hopefully somebody already has worked this out...

    I'm trying to add more build configurations to my app, so that I can build it for several flavors.
    For now, I am looking how to add certain defines to this build configuration, either though momentics or through qmake.
    For now I can add the define to all configs, but the build configurations in Momentics seem not to reflect in qmake.
    Also adding a build variable did not work, could I query for this somehow in qmake?

    Anyone has solved this?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      codenode
      wrote on last edited by
      #2

      So I got a working solution.

      First the bad part: that isn't possible over the IDE.
      You will need to add a new buildtarget.

      First in the pro file, myconfig{ DEFINES += MYDEFINE } will add the define in this configuration.

      Next thing is to copy the make targets from mk/cs-base.mk (in target/.../include folder).

      for example:
      Device-Debug-myconfig:arm/Makefile-myconfig //then copypaste of
      Device-Debug rule

      arm/Makefile-myconfig:/* copy paste arm/Makefile rule*/
      add CONFIG+=myconfig ...

      Now, you are setup, last thing is to change the make build target of you build configuration to the new Device-Debug-myconfig rule.

      Repeat for every build configuration and needed make-target.

      Thanks to Elena Laskavaia for pointing me at this solution :)

      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