[CMake] out of source shared source

Timm Reichert tr at reichert-gmbh.com
Sun Jan 6 17:43:35 EST 2008


Dear Mike,

Now I put this on top of my CMakeLists.txt:

IF (DEFINED PWD)
SET(PWD_BACKUP ${PWD})
ENDIF (DEFINED PWD)
GET_FILENAME_COMPONENT(PWD ${CMAKE_CURRENT_LIST_FILE} PATH)

Then I use ${PWD} in this context.

At the end of the file I do this:
IF (DEFINED PWD_BACKUP)
SET(PWD ${PWD_BACKUP})
ENDIF (DEFINED PWD_BACKUP)

It all works fine now !

Thank you very much.

I don't know another way to use a "local variable" with CMake in this
context :-).

kind regards,

tr




Powered by Open-Xchange.com



More information about the CMake mailing list