Add way to specify per-target config-specific link directories
I develop multi-configuration build where CMake generates one VS solution for all Debug / Release / MinSizeRel / RelWithDebInfo configurations. And I have a lot external libraries for all configurations. All libraries has the same name in different configurations, so they are in separated directories for each configurations. On the other side, VS compiler has ability to declare libraries for linking in C++ sources (see https://msdn.microsoft.com/en-us/library/7f0aews7.aspx), so it means that I don't know all set of linked libraries for specific build , but I know the list of link directories! Through this I can not use target_link_libraries
here.
I can't use link_directories
because this method is not support $<...>
syntax which I use for specify different directories for different configurations. It means that I really need target_link_directories
which is not implemented now! CMake v3.6.2 contains cmMakefile::AddLinkDirectoryForTarget()
method which implement all functionality for target_link_directories
.