[CMake] How to add CMake includes and libraries to Visual Studio Solution?

Rolf Eike Beer eike at sf-mail.de
Mon Jan 16 15:01:37 EST 2012


hellhound at binary-revolution.org wrote:
> Hmm this is strange, INCLUDE_DIRECTORIES is used but no effect.
> I try to set:
> 
>  INCLUDE_DIRECTORIES("C:/binrev/development/boost/1.47/")

Should be INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}), no? We have such a shiny 
FindBoost.cmake that does all the work for you ;)

> But the additional directory entry of my MSVC solution holds only
> the default settings:
> 
> $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include
> ;$(FrameworkSDKDir)\include;
> 
> Is there any chance that i could check if INCLUDE_DIRECORIES is
> set correctly by CMake? Maybe the settings are truncated by visual
> studio ..

You need to use INCLUDE_DIRECTORIES() before doing the ADD_SUBDIRECTORY(), 
ADD_EXECUTABLE(), or ADD_LIBRARY() that should use it.

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120116/051ca900/attachment.pgp>


More information about the CMake mailing list