[CMake] INCLUDE_DIRECTORIES and relative path

jago jagoc jagovic at gmail.com
Mon Nov 2 08:39:50 EST 2009


>>jago jagoc wrote:
>> Hi,
>> I am some problem using INCLUDE_DIRECTORIES macro, i am using Cmake
>> 2.6 - path 0 and Visual studio 2005.
>> In my Cmakelist.txt
>>
>> ...
>> SET(MYINCLUDE_DIR "../3rdParty/include" CACHE STRING "My include dir
>> You may add additional search paths here. Use ; to separate multiple
>> paths.")
>>
>>
> >INCLUDE_DIRECTORIES( ${MYINCLUDE_DIR } )
>> ...

>You need to remove the extra space...

>INCLUDE_DIRECTORIES( ${MYINCLUDE_DIR} )

>-Bill

Hi Bill,
thank you for your answer, i tried without the space but the result is
the same, e.x.
if i write in cmakelists.txt
...

INCLUDE_DIRECTORIES( "../../include" )
or
SET(MYINCLUDE_DIR "../3rdParty/include" CACHE STRING "My include dir
You may add additional search paths here. Use ; to separate multiple
 paths.")

INCLUDE_DIRECTORIES( ${MYINCLUDE_DIR} )
...
in the solution i find( c++ propierties):

F:/Develop/nameofproject/../3rdParty/include;F:/Develop/nameofproject/../../include;

Any suggestion?
Best regards,
Jagovic


More information about the CMake mailing list