QMAKE_EXTRA_TARGETS and QtCreator
-
I'm trying to package up a folder of includes and libs after my static library builds - and I don't want to use the INSTALL system of qmake (for several reasons) - so I created a small edition to my libraries PRO file, based upon documentation surrounding 'adding custom targets' - and I don't seem to be getting anywhere.
I can see the target is being written by qmake into the Makefiles, but my understanding is that by adding the target via QMAKE_EXTRA_TARGETS would add this as a target to all build targets.
Is that incorrect?
Thanks :)
# On Windows we want static libraries and a folder of includes win32: { package_includes.target = $$PWD/build/Windows/includes package_includes.commands = mkdir $$package_includes.target package_includes.depends = package_sdk package_sdk.commands = @echo Packaging the SDK - creating includes directory at $$package_includes.target QMAKE_EXTRA_TARGETS += package_includes package_sdk }
-
I'm trying to package up a folder of includes and libs after my static library builds - and I don't want to use the INSTALL system of qmake (for several reasons) - so I created a small edition to my libraries PRO file, based upon documentation surrounding 'adding custom targets' - and I don't seem to be getting anywhere.
I can see the target is being written by qmake into the Makefiles, but my understanding is that by adding the target via QMAKE_EXTRA_TARGETS would add this as a target to all build targets.
Is that incorrect?
Thanks :)
# On Windows we want static libraries and a folder of includes win32: { package_includes.target = $$PWD/build/Windows/includes package_includes.commands = mkdir $$package_includes.target package_includes.depends = package_sdk package_sdk.commands = @echo Packaging the SDK - creating includes directory at $$package_includes.target QMAKE_EXTRA_TARGETS += package_includes package_sdk }
Hi @chopper said in QMAKE_EXTRA_TARGETS and QtCreator:
I can see the target is being written by qmake into the Makefiles, but my understanding is that by adding the target via QMAKE_EXTRA_TARGETS would add this as a target to all build targets.
My qmake knowledge is still limited, but I guess that these extra targets are not called automatically. You should be able, however, to call
make package_sdk
after the build and then it should work... -
Hi @chopper said in QMAKE_EXTRA_TARGETS and QtCreator:
I can see the target is being written by qmake into the Makefiles, but my understanding is that by adding the target via QMAKE_EXTRA_TARGETS would add this as a target to all build targets.
My qmake knowledge is still limited, but I guess that these extra targets are not called automatically. You should be able, however, to call
make package_sdk
after the build and then it should work... -
@aha_1980 That's what seems to be happening, but that's not the way the examples I've read state it operates.
It's more flexible to simply script my custom stuff outside of qmake anyhow.Thanks