[CMake] Escaping $

Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA artur.kedzierski at navy.mil
Thu Sep 21 17:56:03 EDT 2006


	Hi,

	I am trying to create FooConfig.cmake by having
FooConfig.cmake.in and running CONFIGURE_FILE(FooConfig.cmake.in
FooConfig.cmake)
on it.
	In FooConfig.cmake.in, I have something like:
SET(MY_LOCAL ${CMAKE_INSTALL_PREFIX}/include/foo)
IF (WIN32)
	SET(MY_LOCAL \$(MY_LOCAL) ${CMAKE_INSTALL_PREFIX}/include/foo_win32)
ENDIF (WIN32)
SET(Foo_INCLUDE_DIR \$(MY_LOCAL)

	My goal is to have this generated:
SET(MY_LOCAL /usr/include/foo)
IF (WIN32)
	SET(MY_LOCAL $(MY_LOCAL) /usr/include/foo_win32)
ENDIF (WIN32)
SET(Foo_INCLUDE_DIR $(MY_LOCAL)

	In other words, I want to escape dollar sign for $(MY_LOCAL) so
that it doesn't get evaluated during creation of FooConfig.cmake. How
do I do that? "\$" leaves it as it is and $$ doesn't work either. 
	Is there any other way of escape the dollar sign?
	Thank You. 	

--
Artur Kedzierski
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4670 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20060921/2c68b70e/smime.bin


More information about the CMake mailing list