compile libobs with -fobjc-arc

master
Palana 2013-12-06 21:29:17 +01:00
parent 78e581a3c1
commit 2284ef09fa
2 changed files with 4 additions and 6 deletions

View File

@ -7,7 +7,9 @@ elseif(APPLE AND UNIX)
obs-cocoa.c
util/platform-cocoa.m)
set_source_files_properties(${libobs_platform_src}
PROPERTIES LANGUAGE C)
PROPERTIES
LANGUAGE C
COMPILE_FLAGS "-fobjc-arc")
add_definitions("-DHAVE_STRTOLL")
find_library(COCOA Cocoa)
mark_as_advanced(COCOA)

View File

@ -110,7 +110,7 @@ char *os_get_home_path(void)
if([paths count] == 0)
bcrash("Could not get home directory (platform-cocoa)");
NSString *application_support = paths[0];// objectAtIndex:0];
NSString *application_support = paths[0];
NSUInteger len = [application_support
lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
@ -121,10 +121,6 @@ char *os_get_home_path(void)
memcpy(path, [application_support UTF8String], len);
[application_support release];
[paths release];
return path;
}