From d036076ec6ae0b3d374f011db7fb201815f4a386 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 14 Aug 2022 23:22:22 +0800 Subject: improve cmakelsits --- xmake/plugins/project/cmake/cmakelists.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index 7e5434cc7..5f6644915 100644 --- a/xmake/plugins/project/cmake/cmakelists.lua +++ b/xmake/plugins/project/cmake/cmakelists.lua @@ -497,28 +497,28 @@ function _add_target_compile_options(cmakelists, target, outputdir) if cxxflags then cmakelists:print("set_source_files_properties(" .. _get_unix_path_relative_to_cmake(sourcefile, outputdir) - .. " PROPERTIES COMPILE_OPTIONS $<$:\"" .. cxxflags .. "\">)") + .. " PROPERTIES COMPILE_OPTIONS \"$<$:" .. cxxflags .. ">\")") end local cflags = _get_flags_from_fileconfig(fileconfig, outputdir, "cflags") if cflags then cmakelists:print("set_source_files_properties(" .. _get_unix_path_relative_to_cmake(sourcefile, outputdir) - .. " PROPERTIES COMPILE_OPTIONS $<$:\"" .. cflags .. "\">)") + .. " PROPERTIES COMPILE_OPTIONS \"$<$:" .. cflags .. ">\")") end local cxflags = _get_flags_from_fileconfig(fileconfig, outputdir, "cxflags") if cxflags then cmakelists:print("set_source_files_properties(" .. _get_unix_path_relative_to_cmake(sourcefile, outputdir) - .. " PROPERTIES COMPILE_OPTIONS $<$:\"" .. cxflags .. "\">)") + .. " PROPERTIES COMPILE_OPTIONS \"$<$:" .. cxflags .. ">\")") cmakelists:print("set_source_files_properties(" .. _get_unix_path_relative_to_cmake(sourcefile, outputdir) - .. " PROPERTIES COMPILE_OPTIONS $<$:\"" .. cxflags .. "\">)") + .. " PROPERTIES COMPILE_OPTIONS \"$<$:" .. cxflags .. ">\")") end local cuflags = _get_flags_from_fileconfig(fileconfig, outputdir, "cuflags") if cuflags then cmakelists:print("set_source_files_properties(" .. _get_unix_path_relative_to_cmake(sourcefile, outputdir) - .. " PROPERTIES COMPILE_OPTIONS $<$:\"" .. cuflags .. "\">)") + .. " PROPERTIES COMPILE_OPTIONS \"$<$:" .. cuflags .. ">\")") end end end -- cgit v1.3.1