I'm looking for a way to execute a code after the packaging is done.
I tried to add a custom target that was depending on the PACKAGE target generated. That looks like it does not work, here's cmake error:
CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):
"ALL_BUILD" of type UTILITY
depends on "UPLOAD" (strong)
"PACKAGE" of type GLOBAL_TARGET
depends on "ALL_BUILD" (strong)
"UPLOAD" of type UTILITY
depends on "PACKAGE" (strong)
At least one of these targets is not a STATIC_LIBRARY. Cyclic dependencies are allowed only among static libraries.
To do this I used to following code:
add_custom_target(UPLOAD ALL
COMMAND cmake -E echo "Should be post packging!"
)
add_dependencies(UPLOAD PACKAGE)
Is there some way to have the target to UPLOAD the PACKAGEd file?