@@ -262,11 +262,15 @@ if host_machine.system() == 'linux'
262
262
subdir : ' openframeworks'
263
263
)
264
264
265
+ elif host_machine .system() == ' darwin'
266
+
267
+ deps += [dependency (' appleframeworks' , modules : [' AppKit' , ' Foundation' , ' AVKit' , ' GLKit' ])]
268
+
265
269
endif
266
270
267
- # We need to treat this dependency independently
271
+ # We need to treat this dependency independently
268
272
# because if it's not installed in the host system,
269
- # we will use the .wrap file in the subprojects file AND
273
+ # we will use the .wrap file in the subprojects file AND
270
274
# need to change a define in the cmake subproject
271
275
uriparser_dep = dependency (' uriparser' , required : false )
272
276
if not uriparser_dep.found()
@@ -298,7 +302,7 @@ freeimage_dep = compiler.find_library('freeimage', has_headers: ['FreeImage.h'],
298
302
if not freeimage_dep.found()
299
303
freeimage_opts = cmake.subproject_options()
300
304
# doesn't compile with the define bellow
301
- # freeimage_opts.add_cmake_defines({'BUILD_SHARED_LIBS': true})
305
+ # freeimage_opts.add_cmake_defines({'BUILD_SHARED_LIBS': true})
302
306
# We need -fPIC to link against the produced static library
303
307
freeimage_opts.add_cmake_defines({' CMAKE_POSITION_INDEPENDENT_CODE' : true })
304
308
freeimage_proj = cmake.subproject (' freeimage' , options : freeimage_opts)
@@ -311,7 +315,9 @@ lib = library('openFrameworks',
311
315
sources,
312
316
include_directories : inc,
313
317
dependencies : deps,
314
- install : true )
318
+ install : true ,
319
+ cpp_args : host_machine .system() == ' darwin' ? ' -ObjC++' : ''
320
+ )
315
321
316
322
openframeworks_dep = declare_dependency (link_with : lib, include_directories : inc, dependencies : deps)
317
323
0 commit comments