@@ -262,11 +262,23 @@ if host_machine.system() == 'linux'
262262 subdir : ' openframeworks'
263263 )
264264
265+ elif host_machine .system() == ' darwin'
266+
267+ deps += [dependency (' appleframeworks' , modules : [' Cocoa' , ' AppKit' , ' Foundation' , ' AVKit' , ' GLKit' ])]
268+ add_project_arguments ([' -ObjC++' , ' -fobjc-arc' ], language : ' cpp' )
269+ add_languages (' objcpp' , native : false )
270+
271+ sources += files (
272+ ' libs/openFrameworks/sound/ofAVEngineSoundPlayer.mm' ,
273+ ' libs/openFrameworks/video/ofAVFoundationGrabber.mm' ,
274+ ' libs/openFrameworks/video/ofAVFoundationPlayer.mm' ,
275+ )
276+
265277endif
266278
267- # We need to treat this dependency independently
279+ # We need to treat this dependency independently
268280# because if it's not installed in the host system,
269- # we will use the .wrap file in the subprojects file AND
281+ # we will use the .wrap file in the subprojects file AND
270282# need to change a define in the cmake subproject
271283uriparser_dep = dependency (' uriparser' , required : false )
272284if not uriparser_dep.found()
@@ -298,7 +310,7 @@ freeimage_dep = compiler.find_library('freeimage', has_headers: ['FreeImage.h'],
298310if not freeimage_dep.found()
299311 freeimage_opts = cmake.subproject_options()
300312 # doesn't compile with the define bellow
301- # freeimage_opts.add_cmake_defines({'BUILD_SHARED_LIBS': true})
313+ # freeimage_opts.add_cmake_defines({'BUILD_SHARED_LIBS': true})
302314 # We need -fPIC to link against the produced static library
303315 freeimage_opts.add_cmake_defines({' CMAKE_POSITION_INDEPENDENT_CODE' : true })
304316 freeimage_proj = cmake.subproject (' freeimage' , options : freeimage_opts)
@@ -311,7 +323,8 @@ lib = library('openFrameworks',
311323 sources,
312324 include_directories : inc,
313325 dependencies : deps,
314- install : true )
326+ install : true ,
327+ )
315328
316329openframeworks_dep = declare_dependency (link_with : lib, include_directories : inc, dependencies : deps)
317330
0 commit comments