I'd like to add a custom target named "package" which depends on install target.
When I run make package
it should cause first running make install
and after that, running my custom command to create a package.
I have tried the following DEPENDS install
but it does not work.
I get error message: No rule to make target CMakeFiles/install.dir/all
, needed by CMakeFiles/package.dir/all
install(FILES
"module/module.pexe"
"module/module.nmf"
DESTINATION "./extension")
add_custom_target(package
COMMAND "chromium-browser" "--pack-extension=./extension"
DEPENDS install)
EDIT: I tried DEPENDS install
keyword and add_dependencies(package install)
but neither of them works.
According to http://public.kitware.com/Bug/view.php?id=8438
it is not possible to add dependencies to built-in targets like install
or test