MantisBT - CMake
View Issue Details
0014817CMakeCMakepublic2014-03-19 17:252016-06-10 14:31
ovz 
Kitware Robot 
normalminoralways
closedmoved 
 
 
0014817: Suggestion for library path generation
At present for each entry like

link_directories("${c_lib}/lib/boost/boost_1_55_0/lib/Win32")

the following sub-string is generated for <AdditionaLibraryDirectories> in Visual Studio project files

<AdditionaLibraryDirectories>c:/lib/boost/boost_1_55_0/lib/Win32;c:/lib/boost/boost_1_55_0/lib/Win32/$(Configuration);

I suggest we add $(PlatformName) to the sub-path, making it

<AdditionaLibraryDirectories>c:/lib/boost/boost_1_55_0/lib/Win32;c:/lib/boost/boost_1_55_0/lib/Win32/$(PlatformName)/$(ConfigurationName)

64 bit Windows seamlessly runs both 32 and 64 bit executable so it is quite common to maintain configurations for both platforms on the same machine.
No tags attached.
Issue History
2014-03-19 17:25ovzNew Issue
2014-03-20 08:36Brad KingNote Added: 0035449
2016-06-10 14:29Kitware RobotNote Added: 0042510
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0035449)
Brad King   
2014-03-20 08:36   
The "<dir>" and "<dir>/$(Configuration)" are added for link_directories(<dir>) historically for use in referencing directories in the build tree or in other build trees where the VS IDE project files lay out the files that way. These days CMake knows how to link library files by full path so link_directories is needed only for external packages for which imported targets or full paths to the library files are not known.

A <dir>/$(PlatformName)/$(ConfigurationName) layout is a specific choice for some projects it is not standard. If you want $(PlatformName) then specify it in the link_directories call when CMAKE_GENERATOR names a Visual Studio generator.
(0042510)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.