[CMake] How to set path to library header files?
Bill Hoffman
bill.hoffman at kitware.com
Tue Dec 2 12:33:12 EST 2014
This should work:
include_directories(${CMAKE_SOURCE_DIR}/src)
On 12/2/2014 12:06 PM, Chris Johnson wrote:
> Just for completeness.
>
> File prog/prog.cpp:
>
> #include "mylib/myfunc.h"
>
> int
> main(int argc, char** argv)
> {
> return myfunc();
> }
>
>
> File mylib/myfunc.h:
> int myfunc();
>
>
> And file mylib/myfunc.cpp:
> #include "myfunc.h"
>
> int
> myfunc()
> {
> return 1;
> }
>
>
--
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