[CMake] INCLUDE_DIRECTORIES problem...

BRM bm_witness at yahoo.com
Sat Nov 15 18:54:45 EST 2008


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


More information about the CMake mailing list