${project_SOURCE_DIR} is pointing to the root as I thought it would be.

Another suggestion was to use ${PROJECT_SOURCE_DIR} however, that is an empty 
string.

I have also tried setting a new variable to ${project_SOURCE_DIR}/include and 
using that, however the same result.

I forgot to mention in the earlier e-mail - as I'm running this on Gentoo 
(which has used it for several projects), I am using CMake 2.4 - latest from 
Portage.

Ben


----- Original Message ----
From: Christopher Harvey <[EMAIL PROTECTED]>
To: BRM <[EMAIL PROTECTED]>
Cc: CMake <cmake@cmake.org>
Sent: Sunday, November 16, 2008 12:45:54 AM
Subject: Re: [CMake] INCLUDE_DIRECTORIES problem...

what is ${project_SOURCE_DIR} ?

try adding MESSAGE("project_SOURCE_DIR is '${project_SOURCE_DIR}'")
right before that line in your cmakelists. I have a sneaking suspicion
it's not what you think it is. You have to use something like
${project_SOURCE_DIR}/../include instead.

BRM wrote:
> I have a project with the following layout where '/' is the root of the 
> project workspace:
>
> /
> /project
> /project/CMakeLists.txt
> /project/<source here>
> /include
> /include/project
> /include/project/<headers here>
> /CMakeLists.txt
>
> To be clear - I am doing an out-of-source build at /build (again).
>
> This is okay. I finds the source and all, and tries to build; however, it 
> doesn't find the includes.
> I have tried adding the following line to both the /CMakeLists.txt and 
> /project/CMakeLists.txt:
>
> INCLUDE_DIRECTORIES(${project_SOURCE_DIR}/include)
>
> (assuming 'project' is the name of the project).
>
> However, every time I run 'make' it complains about not being able to find 
> the include files.
>
> I know I did this a few years back on a project I no longer have access
> to. So I know it is doable, but for some reason, I am having problems
> with it.
>
> What am I doing wrong?
>
> Ben
> _______________________________________________
> CMake mailing list
> CMake@cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
>  
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to