stribika
stribika

Reputation: 3176

How to execute external programs from qmake?

I am trying run a program from a qmake .pro file which modifies the final binary. I have already tried system(...) but it does not work. The reason I want this is because by default some properties of the binary prevent debugging and it is inconvenient to do it manually every time. I can do this from simple makefiles.

Here is my .pro file:

TARGET = lprog_server
QT += core \
    xml \
    network
HEADERS += Network/PlayerJoined.hh \
    ...
SOURCES += Globals.cc \
    ...
FORMS +=
RESOURCES +=
QMAKE_LFLAGS += -lboost_random-mt
system(paxctl -pemrxs lprog_server)

It is needed for my homework but the assignment is not to execute something from qmake. It is in fact a server-client software using Qt already more than 2500 lines long.

Upvotes: 1

Views: 1123

Answers (1)

rasjani
rasjani

Reputation: 7970

QMAKE_POST_LINK=paxctl -pemrxs $(TARGET)

Upvotes: 2

Related Questions