2010/2/4 Tim St. Clair <[email protected]>:
> Is there a clean way to copy the install target e.g.
>
> install (TARGETS foo DESTINATION bin)
>
> ~ install(TARGETS foo DESTINATION loc2 RENAME foo_bar) <-doesn't exist.
>
> I basically need to install the same target to *multiple* locations
> with different names.
I think multiple location is already supported just call
install (TARGETS foo DESTINATION loc1)
install (TARGETS foo DESTINATION loc2)
install (TARGETS foo DESTINATION loc3)
etc...
now concerning renaming without building the same target several times?
May be with add_custom_command
add_custom_command(TARGET foo
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
foo ${CMAKE_BINARY_DIR}/foo_renamed)
+
install(FILES ${CMAKE_BINARY_DIR}/foo_renamed DESTINATION loc2)
this may not really solves the problem because install(FILES djfldfj)
won't make what install(TARGETS do like rpath handling etc....
a working (but ugly solution) would be to built the target as many
time as you need to with the needed different name each time.
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake