qmake project custom install and files being installed as non-executable

December 4, 2014 by · 1 Comment
Filed under: Development, Linux 

I had some issues with creating a custom install target from a qmake pro file for a project today and everything took me quite some time to get working I’m embarassed to say. This was done to create make install_ptest target for a yocto build, but the files kept turning up non-executable in the rpm’s and install directory. In the end, I got it working by adding the executable keyword to the CONFIG of the target, in addition to the no_check_exist.

PTEST_FILES += \
    $$ROOT_SOURCE_DIR/tests/service_tests/test_runner.py \
    $$ROOT_BUILD_DIR/tests/service_tests/tst_service_tests

ptest.depends += $(first) sub-tests tests
ptest.path = /usr/lib/AnyApp1/ptest
ptest.files = $$PTEST_FILES
ptest.CONFIG = no_check_exist executable
INSTALLS += ptest
QMAKE_EXTRA_TARGET += ptest

I hope this helps you if you run into the same problem as I had some issues finding information about that specific flag or the problem.