@@ -198,9 +198,6 @@ install_headers(
198
198
' libs/openFrameworks/utils/ofURLFileLoader.h' ,
199
199
' libs/openFrameworks/utils/ofUtils.h' ,
200
200
' libs/openFrameworks/utils/ofXml.h' ,
201
- ' libs/openFrameworks/video/ofAVFoundationGrabber.h' ,
202
- ' libs/openFrameworks/video/ofAVFoundationPlayer.h' ,
203
- ' libs/openFrameworks/video/ofAVFoundationVideoPlayer.h' ,
204
201
' libs/openFrameworks/video/ofDirectShowGrabber.h' ,
205
202
' libs/openFrameworks/video/ofDirectShowPlayer.h' ,
206
203
' libs/openFrameworks/video/ofMediaFoundationPlayer.h' ,
@@ -262,11 +259,46 @@ if host_machine.system() == 'linux'
262
259
subdir : ' openframeworks'
263
260
)
264
261
262
+ elif host_machine .system() == ' darwin'
263
+
264
+ deps += [
265
+ dependency (' Cocoa' ),
266
+ dependency (' AppKit' ),
267
+ dependency (' Foundation' ),
268
+ dependency (' AVKit' ),
269
+ dependency (' GLKit' ),
270
+ dependency (' AVFoundation' ),
271
+ dependency (' opengl' ),
272
+ dependency (' coremedia' ),
273
+ dependency (' corevideo' ),
274
+ dependency (' accelerate' )
275
+ ]
276
+ add_languages (' objcpp' , native : false )
277
+ add_languages (' objc' , native : false )
278
+ add_project_arguments ([' -ObjC++' , ' -fobjc-arc' ], language : [' cpp' , ' objcpp' , ' objc' ])
279
+
280
+ sources += files (
281
+ ' libs/openFrameworks/sound/ofAVEngineSoundPlayer.mm' ,
282
+ ' libs/openFrameworks/video/ofAVFoundationGrabber.mm' ,
283
+ ' libs/openFrameworks/video/ofAVFoundationPlayer.mm' ,
284
+ ' libs/openFrameworks/video/ofAVFoundationVideoPlayer.m' ,
285
+ )
286
+
287
+ install_headers (
288
+ ' libs/openFrameworks/sound/ofAVEngineSoundPlayer.h' ,
289
+ ' libs/openFrameworks/video/ofAVFoundationGrabber.h' ,
290
+ ' libs/openFrameworks/video/ofAVFoundationPlayer.h' ,
291
+ ' libs/openFrameworks/video/ofAVFoundationGrabber.h' ,
292
+ ' libs/openFrameworks/video/ofAVFoundationPlayer.h' ,
293
+ ' libs/openFrameworks/video/ofAVFoundationVideoPlayer.h' ,
294
+ subdir : ' openframeworks'
295
+ )
296
+
265
297
endif
266
298
267
- # We need to treat this dependency independently
299
+ # We need to treat this dependency independently
268
300
# because if it's not installed in the host system,
269
- # we will use the .wrap file in the subprojects file AND
301
+ # we will use the .wrap file in the subprojects file AND
270
302
# need to change a define in the cmake subproject
271
303
uriparser_dep = dependency (' uriparser' , required : false )
272
304
if not uriparser_dep.found()
@@ -298,7 +330,7 @@ freeimage_dep = compiler.find_library('freeimage', has_headers: ['FreeImage.h'],
298
330
if not freeimage_dep.found()
299
331
freeimage_opts = cmake.subproject_options()
300
332
# doesn't compile with the define bellow
301
- # freeimage_opts.add_cmake_defines({'BUILD_SHARED_LIBS': true})
333
+ # freeimage_opts.add_cmake_defines({'BUILD_SHARED_LIBS': true})
302
334
# We need -fPIC to link against the produced static library
303
335
freeimage_opts.add_cmake_defines({' CMAKE_POSITION_INDEPENDENT_CODE' : true })
304
336
freeimage_proj = cmake.subproject (' freeimage' , options : freeimage_opts)
@@ -311,7 +343,8 @@ lib = library('openFrameworks',
311
343
sources,
312
344
include_directories : inc,
313
345
dependencies : deps,
314
- install : true )
346
+ install : true ,
347
+ )
315
348
316
349
openframeworks_dep = declare_dependency (link_with : lib, include_directories : inc, dependencies : deps)
317
350
0 commit comments