Hi,
I would like to include a generated file into a package. I have something like
that:
include(CPack)
add_custom_command (OUTPUT hgHash.txt
COMMAND hg --debug id -i >hgHash.txt
COMMENT "Getting hg hash")
add_custom_target (hg_hash
DEPENDS hgHash.txt
COMMENT "hg_hash target")
Now the following would solve my problems, but it does not work:
add_dependencies(package hg_hash)
I get:
Cannot add target-level dependencies to non-existent target "package".
I know I have CPack configured properly, because if I create the file manually
it gets included. I also can add the dependency on one of my libraries, but I
only want to generate this file when package is executed.
What am I missing?
Thanks,
Sasha
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake