[CMake] Question about install()
Bill Hoffman
bill.hoffman at kitware.com
Tue Dec 9 21:18:57 EST 2008
Robert Dailey wrote:
>
> I actually did a little thinking and I came up with this:
>
> add_custom_command( TARGET ${component_project_name}
> POST_BUILD
> COMMAND "depends.py" ARGS "$(ConfigurationName)"
> )
>
> Of course this only works for visual studio projects, but it does
> accomplish what I want. The only downside is that I have to put the DLL
> copy logic in the python script instead of keeping it centralized within
> CMake.
You do know about CMAKE_CFG_INTDIR right? It will expand out to the
configuration directory name on VS and Xcode, and for makefiles it will
be ".".
So, you could have:COMMAND "depends.py" ARGS ${CMAKE_CFG_INTDIR}. It
will not help with the separate named targets, but it will give you the
directory that they are in. If you did not want to use python, you
could use cmake -DCONFIG=${CMAKE_CFG_INTDIR} -E myscript.cmake.
-Bill
More information about the CMake
mailing list