[CMake] Howto to work with variables from central makefiles....

Thomas Lehmann t.lehmann at rtsgroup.net
Wed Nov 17 07:29:39 EST 2010


Hi all,

for an automatically forced include I have provided an
option like this:

set(WIN32_SPEC ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/global/win32_spec.h)
add_definitions(-FI ${WIN32_SPEC})

But when including this central file (find_package) the variable CMAKE_CURRENT_SOURCE_DIR
changes and then the path and filename of the header is wrong.

How to proceed best?
Can I avoid that for those "set" statement the variable is not overwritten by those
files including this central makefile?

Kind Regards
Thomas


Thomas Lehmann
Scrum Master

[cid:rts-logo.png at a9b66252e87e47c980cdfd1dfb10cfae]

RTS Realtime Systems Software GmbH, Rembrandtstrasse 13, D-60596 Frankfurt am Main
T: +49.69.61009.0 / F: +49.69.61009.181

Sitz: Frankfurt am Main - HRB 84467 Amtsgericht Frankfurt am Main
Gesch?ftsf?hrer: Steffen Gemuenden, Igor Sluga

www.rtsgroup.net

This email and any attachments are for the exclusive and confidential use of the intended recipient. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please do not read, distribute or take action in reliance upon this message. If you have received this in error, please notify me immediately by return email and promptly delete this message and its attachments from your computer system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101117/58b86495/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rts-logo.png
Type: image/png
Size: 13233 bytes
Desc: rts-logo.png
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101117/58b86495/attachment-0001.png>


More information about the CMake mailing list