mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-21 16:44:07 +00:00
appkit
This commit is contained in:
8
pl/ostype/Darwin.pl
Normal file
8
pl/ostype/Darwin.pl
Normal file
@@ -0,0 +1,8 @@
|
||||
$library_suffix = ".dylib";
|
||||
set_shared_flag("-dynamiclib");
|
||||
|
||||
use_backend("appkit");
|
||||
|
||||
add_cflags("-DSTBI_NO_THREAD_LOCALS");
|
||||
|
||||
1;
|
||||
@@ -1,4 +1,4 @@
|
||||
if (param_get("experimental-wayland")) {
|
||||
IF (param_get("experimental-wayland")) {
|
||||
use_backend("wayland", "x11");
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -46,6 +46,13 @@ if (grep(/^wayland$/, @backends)) {
|
||||
$gl_libs = "-lGL -lGLU";
|
||||
}
|
||||
|
||||
if (grep(/^appkit$/, @backends)) {
|
||||
add_cflags("-DUSE_APPKIT");
|
||||
new_object("src/backend/appkit.m");
|
||||
|
||||
$gl_libs = "-lGL -lGLU";
|
||||
}
|
||||
|
||||
if (param_get("stb-image")) {
|
||||
add_cflags("-DUSE_STB_IMAGE");
|
||||
}
|
||||
|
||||
@@ -40,10 +40,14 @@ sub new_example {
|
||||
push(@examples_targets, "${_[0]}${executable_suffix}");
|
||||
}
|
||||
|
||||
sub set_shared_flag {
|
||||
@shared = $_[0];
|
||||
}
|
||||
|
||||
sub new_object {
|
||||
my @l = glob($_[0]);
|
||||
foreach my $e (@l) {
|
||||
$e =~ s/\.c$/$object_suffix/;
|
||||
$e =~ s/\.(c|m)$/$object_suffix/;
|
||||
push(@library_targets, $e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user