Hi Jerome, you can use two install() commands. I use this often, and I see nothing wrong with it. As you said, if you want to avoid code duplication, you can make a macro for it.
Petr On Wed, Jul 4, 2012 at 9:41 AM, Jérôme Reybert <[email protected]> wrote: > Hi, > > I need to install the same files (actually a directory, it doesn't change > anything) to several destination. Typically, I need to install the same > header files to "include" and "sys-include" (no question about that, this is > mandatory). > > I thought I could specify multiple DESTINATION flags in intall command, like > > install (DIRECTORY ${PROJECT_SOURCE_DIR}/include/sys/${SYSTEM}/ > DESTINATION ${INCLUDE_DEST1} DESTINATION ${INCLUDE_DEST2} > PATTERN "private" EXCLUDE) > > but CMake doesn't like that. > > Easy solution would be to make two install commands, or include this command > in a macro to avoid code copy. Do you see a better way? > > BTW, I am using cmake 2.6 > > Thanks, > > -- > Jérôme > > -- > > 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 -- 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
