Question

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.

Was it helpful?

Solution

QMAKE_POST_LINK=paxctl -pemrxs $(TARGET)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top