View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014791CMakeCMakepublic2014-03-06 10:212016-06-10 14:31
ReporterPhilipp Möller 
Assigned ToKitware Robot 
PlatformLinuxOSArch LinuxOS Version
Product VersionCMake 
Target VersionFixed in Version 
Summary0014791: Allow link directories to be set per target
DescriptionCurrently it is not possible to specify the directories in which libraries for linking are to be searched on a per target basis. This is a standard flag in most compilers.

Usually specifying the directory in which libraries are searched for is not necessary as CMake convention is to use full paths for libraries. Unfortunately, specifying the directory **only** (and not the actual libraries) is necessary to get the Visual Studio auto-linking feature to work which is used by several C++ libraries (Boost, CGAL).

A common thing for VS users is to do:

find_package(Boost COMPONENTS system) # checks omitted
add_executable(main main.cpp) # executable using Boost.system
link_directories(${Boost_LIBRARY_DIRS}) # global sucks, enable this per target
# set includes and so on
TagsNo tags attached.
Attached Files


Kitware Robot (administrator)
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.

 Issue History
Date Modified Username Field Change
2014-03-06 10:21 Philipp Möller New Issue
2016-06-10 14:29 Kitware Robot Note Added: 0042501
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed

Copyright © 2000 - 2018 MantisBT Team