Hi Chris,

Given your file structure

The file structure:
.
|-- bin/
|-- include/
|   `-- mylib/
|-- lib/
`-- src/
    |-- CMakeLists.txt
    |-- mylib/
    |   |-- CMakeLists.txt
    |   |-- myfunc.cpp
    |   `-- myfunc.h
    `-- prog/
        |-- CMakeLists.txt
        `-- prog.cpp

you should add in ./src/prog/CMakeLists.txt in include_directories the
correct path to myfunc.h. Assuming CMAKE_SOURCE_DIR is "." (this is where
your top level CMakeLists.txt is located):

include_directories(${CMAKE_SOURCE_DIR}/src/mylib)

Cheers!
Angeliki


On Tue, Dec 2, 2014 at 7:04 PM, Chris Johnson <[email protected]> wrote:

> Adding this directive does not seem to change the results at all,
> actually.  Am I missing something?​
>
> Thanks,
> ..chris
>
> On Tue, Dec 2, 2014 at 11:33 AM, Bill Hoffman <[email protected]>
> wrote:
>
>> This should work:
>>
>> include_directories(${CMAKE_SOURCE_DIR}/src)
>>
>>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to