diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 3f7cb235b98..76319bab9a6 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -400,13 +400,13 @@ function _get_configs_for_windows(package, configs, opt) -- shrink PDB file -- ref: https://devblogs.microsoft.com/cppblog/shrink-my-program-database-pdb-file/ if not opt._configs_str:find("CMAKE_EXE_LINKER_FLAGS") then - table.insert(configs, "-DCMAKE_EXE_LINKER_FLAGS=\"/opt:ref /opt:icf /pdbcompress\"") + table.insert(configs, "-DCMAKE_EXE_LINKER_FLAGS=/opt:ref /opt:icf /pdbcompress") end if not opt._configs_str:find("CMAKE_SHARED_LINKER_FLAGS") then - table.insert(configs, "-DCMAKE_SHARED_LINKER_FLAGS=\"/opt:ref /opt:icf /pdbcompress\"") + table.insert(configs, "-DCMAKE_SHARED_LINKER_FLAGS=/opt:ref /opt:icf /pdbcompress") end if not opt._configs_str:find("CMAKE_STATIC_LINKER_FLAGS") then - table.insert(configs, "-DCMAKE_STATIC_LINKER_FLAGS=\"/opt:ref /opt:icf /pdbcompress\"") + table.insert(configs, "-DCMAKE_STATIC_LINKER_FLAGS=/opt:ref /opt:icf /pdbcompress") end _get_configs_for_generic(package, configs, opt)