Hi Nils, thanks for the reply.
On Mon, Nov 9, 2015 at 4:09 PM, Nils Gladitz <nilsglad...@gmail.com> wrote: > CMake does not implement any diagnostics that would prevent you from doing > so but installing distinct files (or even the same file multiple times) to > the same destination path is ill defined irregardless of it being in the > same or distinct components. > Not in WiX, though - installing the same file from more than one feature is common practice. The shared component will just get a higher reference count. Installing different files to the same location, on the other hand, *is* an error in WiX, which is what I'm running into (even though they're really the same file). It also works as expected in the archive generators - as long as both files are the same, that is, otherwise it is indeed ill-defined. I think there should be a change in the CMake/CPack behavior here, regardless of whether the WiX generator will be extended to support this use case. For generators that support the same file to be installed from more than one component, such as the archive generators, it should check if the files are the same, and if not, report an error. Generators that don't support two files with the same destination at all should give an error when that occurs. A partial workaround is to put shared files in a separate, hidden CPack >> component/WIX feature, and set component dependencies. However, with many >> shared DLLs, maintaining this gets complex really fast, so I'd rather not >> have to do this. >> > > I think from CPack's point of view this is the proper thing to do. It's probably the most portable solution to do this at the CPack level, indeed. However, I found that the CPack WiX generator doesn't support cross-feature dependencies, so I can't automatically install the required files based on the user's feature selections. This is understandable, as WiX itself doesn't appear to have support for this. From what information I could find, the common approach in WiX is indeed to reference the common components (or component groups) from each feature that need them. I'll have to think about the best way to do this. best regards Mark
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake