[CMake] Accessing the parent directory of current directory

Vinay Raj Hampapur vinayraj.hampapur at gmail.com
Thu Aug 4 20:08:42 EDT 2011


>
> 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.s4403 at 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 <d3ck0r at 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.hampapur at 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
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110804/965f2078/attachment.htm>


More information about the CMake mailing list