On 9. Sep, 2010, at 14:39 , David Aldrich wrote:

> Hi Michael
> 
>> With CMake you can use absolute and relative paths, no problem. If you use
>> absolute paths, please use one of the pre-defined variables, such as
>> ${CMAKE_SOURCE_DIR}, ${CMAKE_BINARY_DIR}, ${CMAKE_CURRENT_SOURCE_DIR}
>> ${CMAKE_CURRENT_BINARY_DIR} ${PROJECT_SOURCE_DIR}, ${PROJECT_BINARY_DIR},
>> ${<project_name>_SOURCE_DIR} or ${<project_name>_BINARY_DIR}.
> 
> Thanks. My situation is:
> 
>  ------ FolderA --- CMakeLists.txt
>      |
>      |- FolderB --- ErrorHandler.cpp
> 
> As FolderB is not beneath FolderA, I don't know how to specify 
> FolderB/ErrorHandler.cpp in CMakeLists.txt using CMAKE_CURRENT_SOURCE_DIR. Do 
> I need to set PROJECT_SOURCE_DIR to the parent folder of A and B?
> 
> Can you suggest how I can do this please?
> 
> Best regards
> 
> David


Are they _always_ next to each other and is FolderB always called by that name? 
If so, just do ${CMAKE_PROJECT_DIR}/../FolderB.

Michael

--
There is always a well-known solution to every human problem -- neat, 
plausible, and wrong.
H. L. Mencken

Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
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