@@ -140,7 +140,7 @@ function SetupNativeProject()
140140
141141 -- Compiler-specific options
142142
143- filter { " action:vs *" }
143+ filter { " toolset:msc *" }
144144 buildoptions { msvc_buildflags }
145145 defines { msvc_cpp_defines }
146146
@@ -158,7 +158,7 @@ function SetupNativeProject()
158158 buildoptions { gcc_buildflags , " -stdlib=libc++" }
159159 links { " c++" }
160160
161- filter { " system :not windows " , " language:C++" }
161+ filter { " toolset :not msc* " , " language:C++" }
162162 cppdialect " C++14"
163163 buildoptions { " -fpermissive" }
164164
@@ -168,7 +168,7 @@ function SetupNativeProject()
168168 defines { " WIN32" , " _WINDOWS" }
169169
170170 -- For context: https://github.com/premake/premake-core/issues/935
171- filter {" system:windows" , " action:vs *" }
171+ filter {" system:windows" , " toolset:msc *" }
172172 systemversion (" latest" )
173173
174174 filter {}
@@ -277,3 +277,23 @@ function EnableNativeProjects()
277277
278278 return true
279279end
280+
281+ function AddPlatformSpecificFiles (folder , filename )
282+
283+ if os .istarget (" windows" ) then
284+ filter { " toolset:msc*" , " architecture:x86_64" }
285+ files { path .join (folder , " x86_64-pc-win32-msvc" , filename ) }
286+ filter { " toolset:msc*" , " architecture:x86" }
287+ files { path .join (folder , " i686-pc-win32-msvc" , filename ) }
288+ elseif os .istarget (" macosx" ) then
289+ filter { " architecture:x86_64" }
290+ files { path .join (folder , " x86_64-apple-darwin12.4.0" , filename ) }
291+ filter {" architecture:x86" }
292+ files { path .join (folder , " i686-apple-darwin12.4.0" , filename ) }
293+ elseif os .istarget (" linux" ) then
294+ filter { " architecture:x86_64" }
295+ files { path .join (folder , " x86_64-linux-gnu" .. (UseCxx11ABI () and " -cxx11abi" or " " ), filename ) }
296+ else
297+ print " Unknown architecture"
298+ end
299+ end
0 commit comments