Hi, This question has been asked quite a few times, but never satisfactorily answerded before: How do I install a bunch of headers preserving directory structure? The following snippet
> set(HEADERS header1.h dir/header2.h) > install(FILES ${HEADERS} DESTINATION include) puts both files inside the same directory. The structure is not preserved. The following workaround does the trick: > foreach(HEADER HEADERS) > string(REGEX MATCH "(.*)[/\\]" DIR ${HEADER}) > install(FILES ${HEADER} DESTINATION include/${DIR}) > endforeach(HEADER HEADERS) However, I consider this as a workaround, not as a solution! It gets more complicated as soon as I want to build frameworks on mac, > set_target_properties(my_lib PROPERTIES PUBLIC_HEADER ${HEADERS}) again puts both files inside the same directory, ignoring structure. Here the workaround is even less a solution, if this is really the only way: <http://www.cmake.org/pipermail/cmake/2008-June/022378.html> Hasn't this been considered before? The public wiki shows two use cases of cmake frameworks, but neither of them puts headers into a directory hierarchy. <http://www.cmake.org/Wiki/CMake:MacOSX_Frameworks> cheers, Daniel _______________________________________________ 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