[CMake] Cannot add a Dependency to INSTALL Target

Tyler Roscoe tyler at cryptio.net
Thu Feb 26 14:39:23 EST 2009


On Thu, Feb 26, 2009 at 10:43:05AM -0700, david_bjornbak at agilent.com wrote:
> Under CMakeLists.txt files, I want to add a dependency so Install will run a target
> 
> add_custom_target(3rd_party_install  ALL)
> 
> ADD_DEPENDENCIES(INSTALL 3rd_party_install )
> 
> When I run cmake, it complains INSTALL is not defined yet but, it is if I exclude this new depenency

I believe that INSTALL (along with ALL and CLEAN) are not "real"
targets, so your strategy won't work.

I don't know what the best workaround is, but maybe you could create a
dummy target (fake_install) and add your targets as dependencies on that
dummy target?

tyler


More information about the CMake mailing list