[CMake] How to set path to library header files?
Bill Hoffman
bill.hoffman at kitware.com
Wed Dec 3 11:56:49 EST 2014
On 12/2/2014 5:19 PM, Chris Johnson wrote:
> The target_link_libraries() directive is adequate for this job when the
> header files for the library are simply referred to with no directory
> prefix, i.e. #include "some file.h" instead of #include "my
> lib/somefile.h". Referencing the library with target_link_libraries()
> appears to automatically add the necessary source directories of the
> mentioned libraries to the include paths.
The include directories will be copied out of the library and chained
along, but they need to be explicitly set somewhere. Although you
could get an install to happen in the middle of a build with custom
commands and targets, I would not recommend it. Just get the include
paths correctly specified and things should work.
--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
More information about the CMake
mailing list