[CMake] cmake generates broken project file when path includes whitespace (in this case at least)

Paul Baumer paul.baumer2 at googlemail.com
Mon Mar 19 10:51:01 EDT 2012


Hello,

I have the following in my Cmakelists.txt file:

set_target_properties( MyApp PROPERTIES STATIC_LIBRARY_FLAGS
"${SOME_LIB_FILENAME}")

If the SOME_LIB_FILENAME path includes white space such as

c:/Projects/Foo 4/Src/somelib.lib

the generated visual studio 2008 file includes the following fragment:

<Tool Name="VCLibrarianTool"
AdditionalOptions="'"C:/Projects/Foo
4/Src/somelib.lib"'"

Please notice the linebreak after Foo, this causes the linker to fail,
saying it can not find "C:/Projects/Foo".

I guess this is a cmake bug, but I need to find a workaround for this one.
I am using cmake 2.8.2 on Windows 7.

Any ideas?

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120319/937bca4d/attachment.htm>


More information about the CMake mailing list