Did you try the quotation marks, instead of angle brackets?  Angle
brackets won't allow bob.cpp to see bob.h.

If you want to be pedantic.
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/Steve.

Also make sure that you completely regenerate your cmake build
directory, by at least deleting CMakeCache.txt, since that is often
what it takes when some configuration item changes.

Regards,

JUan

On Thu, Aug 4, 2011 at 7:08 PM, Vinay Raj Hampapur
<vinayraj.hampa...@gmail.com> wrote:
>> er..
>> Here's the directory structure I'm working with :
>> Alice
>>       +    Steve
>>                + steve.cpp
>>                + steve.h
>>       +    Bob
>>                 + bob.cpp
>>                 + bob.h
>>
>
> The CMakeLists.txt file is in the Bob folder. I'm trying to include the
> files from the Steve folder in my final build solution. Doing a
> include_directories(../Steve) did not solve my problem.
> Any advice?
>
> Thanks,
> Vinay
>
> On Thu, Aug 4, 2011 at 5:00 PM, j s <j.s4...@gmail.com> wrote:
>>
>> Angle brackets <> are for system files, use quotes instead.
>>
>> include_directories( ../peer )
>> #include "peer.h"
>>
>> Regards,
>>
>> Juan
>>
>> On Thu, Aug 4, 2011 at 6:52 PM, J Decker <d3c...@gmail.com> wrote:
>> > #include "../peer/peer.h" ?
>> >
>> > include_directories( ../peer )
>> > #include <peer.h>
>> >
>> >
>> > On Thu, Aug 4, 2011 at 4:48 PM, Vinay Raj Hampapur
>> > <vinayraj.hampa...@gmail.com> wrote:
>> >> Hello,
>> >>            I'm new to CMake and am trying to include files present in a
>> >> directory which is a sibling to my own. I want to acheive this by
>> >> accessing
>> >> the parent directory and then moving into the other child directory.
>> >> Any help in this regard is greatly appreciated.
>> >>
>> >> Thanks,
>> >> Vinay
>> >>
>> >> _______________________________________________
>> >> Powered by www.kitware.com
>> >>
>> >> Visit other Kitware open-source projects at
>> >> http://www.kitware.com/opensource/opensource.html
>> >>
>> >> Please keep messages on-topic and check the CMake FAQ at:
>> >> http://www.cmake.org/Wiki/CMake_FAQ
>> >>
>> >> Follow this link to subscribe/unsubscribe:
>> >> http://www.cmake.org/mailman/listinfo/cmake
>> >>
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Please keep messages on-topic and check the CMake FAQ at:
>> > http://www.cmake.org/Wiki/CMake_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.cmake.org/mailman/listinfo/cmake
>> >
>
>
_______________________________________________
Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to