-1

How to add compilation line for C++ like this?

-D'SVN_REV="$(shell svnversion -n .)"'

I need to use in in Qt project. I tried to add this:

QMAKE_CXXFLAGS += -D'SVN_REV="$(shell svnversion -n .)"'

But it doesn't work at all

What am i doing wrong?

Anzipex
  • 69
  • 10

1 Answers1

0

Solution: https://stackoverflow.com/a/15859809/6289623

I just paste this in my Qt .pro file:

DEFINES += "SVN_REV=\"\\\"$$system(svnversion -n)\\\"\""

And then i can use SVN_REV

Anzipex
  • 69
  • 10