Skip to content

Commit 5f25e6c

Browse files
authored
Chri7325/cocoa build (microsoft#7)
* premake: Use _PLATFORM booleans to clean up platform checks * premake: Remove all winuwp arm configurations as it is deprecated * premake: Add cocoa configurations or remove unneeded mobile configurations
1 parent 995fc75 commit 5f25e6c

File tree

1 file changed

+101
-33
lines changed

1 file changed

+101
-33
lines changed

cpprest.lua

+101-33
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ project "cpprest"
6161
-- configurations
6262
-- -------------------------------------------------------------
6363

64-
if (os.is("windows") and not _TARGET_IS_WINUWP) then
64+
if (_PLATFORM_WINDOWS) then
6565
-- -------------------------------------------------------------
6666
-- configuration { "windows" }
6767
-- -------------------------------------------------------------
@@ -139,7 +139,7 @@ project "cpprest"
139139
-- -------------------------------------------------------------
140140
end
141141

142-
if (os.is("linux") and not _OS_IS_ANDROID) then
142+
if (_PLATFORM_LINUX) then
143143
-- -------------------------------------------------------------
144144
-- configuration { "linux" }
145145
-- -------------------------------------------------------------
@@ -215,7 +215,7 @@ project "cpprest"
215215
-- -------------------------------------------------------------
216216
end
217217

218-
if (os.is("macosx") and not _OS_IS_IOS and not _OS_IS_ANDROID) then
218+
if (_PLATFORM_MACOS) then
219219
-- -------------------------------------------------------------
220220
-- configuration { "macosx" }
221221
-- -------------------------------------------------------------
@@ -259,9 +259,101 @@ project "cpprest"
259259
-- -------------------------------------------------------------
260260
end
261261

262-
if (_OS_IS_IOS) then
262+
if (_PLATFORM_COCOA) then
263263
-- -------------------------------------------------------------
264-
-- configuration { "ios" } == _OS_IS_IOS
264+
-- configuration { "cocoa*" }
265+
-- -------------------------------------------------------------
266+
267+
-- common configuration settings
268+
269+
dofile (_BUILD_DIR .. "/static_cocoa.lua")
270+
271+
-- project specific configuration settings
272+
273+
configuration { "cocoa*" }
274+
275+
files {
276+
"Release/src/pplx/pplxapple.cpp",
277+
}
278+
279+
-- -------------------------------------------------------------
280+
-- configuration { "cocoa_arm64_debug" }
281+
-- -------------------------------------------------------------
282+
283+
-- common configuration settings
284+
285+
dofile (_BUILD_DIR .. "/static_cocoa_arm64_debug.lua")
286+
287+
-- project specific configuration settings
288+
289+
-- configuration { "cocoa_arm64_debug" }
290+
291+
-- -------------------------------------------------------------
292+
-- configuration { "cocoa_arm64_release" }
293+
-- -------------------------------------------------------------
294+
295+
-- common configuration settings
296+
297+
dofile (_BUILD_DIR .. "/static_cocoa_arm64_release.lua")
298+
299+
-- project specific configuration settings
300+
301+
-- configuration { "cocoa_arm64_release" }
302+
303+
-- -------------------------------------------------------------
304+
-- configuration { "cocoa_sim64_debug" }
305+
-- -------------------------------------------------------------
306+
307+
-- common configuration settings
308+
309+
dofile (_BUILD_DIR .. "/static_cocoa_sim64_debug.lua")
310+
311+
-- project specific configuration settings
312+
313+
-- configuration { "cocoa_sim64_debug" }
314+
315+
-- -------------------------------------------------------------
316+
-- configuration { "cocoa_sim64_release" }
317+
-- -------------------------------------------------------------
318+
319+
-- common configuration settings
320+
321+
dofile (_BUILD_DIR .. "/static_cocoa_sim64_release.lua")
322+
323+
-- project specific configuration settings
324+
325+
-- configuration { "cocoa_sim64_release" }
326+
327+
-- -------------------------------------------------------------
328+
-- configuration { "cocoa_x64_debug" }
329+
-- -------------------------------------------------------------
330+
331+
-- common configuration settings
332+
333+
dofile (_BUILD_DIR .. "/static_cocoa_x64_debug.lua")
334+
335+
-- project specific configuration settings
336+
337+
-- configuration { "cocoa_x64_debug" }
338+
339+
-- -------------------------------------------------------------
340+
-- configuration { "cocoa_x64_release" }
341+
-- -------------------------------------------------------------
342+
343+
-- common configuration settings
344+
345+
dofile (_BUILD_DIR .. "/static_cocoa_x64_release.lua")
346+
347+
-- project specific configuration settings
348+
349+
-- configuration { "cocoa_x64_release" }
350+
351+
-- -------------------------------------------------------------
352+
end
353+
354+
if (_PLATFORM_IOS) then
355+
-- -------------------------------------------------------------
356+
-- configuration { "ios*" }
265357
-- -------------------------------------------------------------
266358

267359
-- common configuration settings
@@ -327,9 +419,9 @@ project "cpprest"
327419
-- -------------------------------------------------------------
328420
end
329421

330-
if (_OS_IS_ANDROID) then
422+
if (_PLATFORM_ANDROID) then
331423
-- -------------------------------------------------------------
332-
-- configuration { "android" } == _OS_IS_ANDROID
424+
-- configuration { "android*" }
333425
-- -------------------------------------------------------------
334426

335427
-- common configuration settings
@@ -451,9 +543,9 @@ project "cpprest"
451543
-- -------------------------------------------------------------
452544
end
453545

454-
if (_TARGET_IS_WINUWP) then
546+
if (_PLATFORM_WINUWP) then
455547
-- -------------------------------------------------------------
456-
-- configuration { "winuwp" } == _TARGET_IS_WINUWP
548+
-- configuration { "windows" }
457549
-- -------------------------------------------------------------
458550

459551
-- common configuration settings
@@ -530,30 +622,6 @@ project "cpprest"
530622

531623
-- configuration { "winuwp_release", "x64" }
532624

533-
-- -------------------------------------------------------------
534-
-- configuration { "winuwp_debug", "ARM" }
535-
-- -------------------------------------------------------------
536-
537-
-- common configuration settings
538-
539-
dofile (_BUILD_DIR .. "/static_winuwp_arm_debug.lua")
540-
541-
-- project specific configuration settings
542-
543-
-- configuration { "winuwp_debug", "ARM" }
544-
545-
-- -------------------------------------------------------------
546-
-- configuration { "winuwp_release", "ARM" }
547-
-- -------------------------------------------------------------
548-
549-
-- common configuration settings
550-
551-
dofile (_BUILD_DIR .. "/static_winuwp_arm_release.lua")
552-
553-
-- project specific configuration settings
554-
555-
-- configuration { "winuwp_release", "ARM" }
556-
557625
-- -------------------------------------------------------------
558626
-- configuration { "winuwp_debug", "ARM64" }
559627
-- -------------------------------------------------------------

0 commit comments

Comments
 (0)