Hi, There is a bug in CMake's export file generator where it does not correctly escape Windows paths when generating export files . This was originally reported on the LLVM mailing list [1]. I'm using CMake 3.2.3.
In a generated export file I see ``` # Create imported target LLVMDebugInfoPDB add_library(LLVMDebugInfoPDB STATIC IMPORTED) set_target_properties(LLVMDebugInfoPDB PROPERTIES INTERFACE_LINK_LIBRARIES "LLVMObject;LLVMSupport;C:\Program Files (x86)\Microsoft Visual Studio 14.0\DIA SDK\lib\diaguids.lib" ) ``` One of the libraries listed in the INTERFACE_LINK_LIBRARIES has invalid syntax because the slashes have not been escaped. I believe the correct solution would be to have CMake convert all paths to CMake style paths before writing them to export files. Brad King (CC'ed) had this comment ``` However, CMake should also be taught to escape the backslashes correctly when generating the export files. Take a look at Source/cmExportFileGenerator.cxx Source/cmExportBuildFileGenerator.cxx Source/cmExportInstallFileGenerator.cxx in the CMake source tree. There are several places that just generate double quotes around a raw value that should instead use EscapeForCMake. ``` [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-June/086958.html Thanks, Dan -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers