2019-07-29 07:56:45 -04:00
|
|
|
|
2020-02-25 05:35:30 -05:00
|
|
|
if get_option('mri_includes') == ''
|
|
|
|
ver = get_option('mri_version')
|
2020-11-15 18:47:21 -05:00
|
|
|
if ver.version_compare('<=1.8')
|
2020-12-31 14:50:07 -05:00
|
|
|
global_args += '-DMKXPZ_LEGACY_RUBY'
|
2020-12-31 19:59:53 -05:00
|
|
|
elif ver.version_compare('>=3.0') and compilers['cpp'].get_id() == 'clang'
|
2020-12-27 03:27:38 -05:00
|
|
|
global_args += '-fdeclspec'
|
2020-02-26 11:05:46 -05:00
|
|
|
endif
|
2020-02-25 05:35:30 -05:00
|
|
|
global_dependencies += dependency('ruby-' + ver)
|
|
|
|
else
|
|
|
|
global_args += ('-I' + get_option('mri_includes'))
|
|
|
|
global_dependencies += compilers['cpp'].find_library(get_option('mri_library'), dirs: get_option('mri_libpath'))
|
2019-07-30 02:13:36 -04:00
|
|
|
endif
|
2019-07-29 07:56:45 -04:00
|
|
|
|
2019-08-20 13:22:07 -04:00
|
|
|
if get_option('no_preload_scripts') == true
|
2020-12-31 14:50:07 -05:00
|
|
|
add_project_arguments('-DMKXPZ_NO_PRELOADSCRIPTS', language: ['cpp','objc','objcpp'])
|
2019-08-20 13:22:07 -04:00
|
|
|
endif
|
|
|
|
|
2019-12-14 13:31:48 -05:00
|
|
|
global_include_dirs += include_directories('.')
|
2019-07-29 07:56:45 -04:00
|
|
|
|
2019-07-31 08:47:44 -04:00
|
|
|
binding_source = [files(
|
2019-07-29 07:56:45 -04:00
|
|
|
'binding-mri.cpp',
|
|
|
|
'binding-util.cpp',
|
|
|
|
'table-binding.cpp',
|
|
|
|
'etc-binding.cpp',
|
|
|
|
'bitmap-binding.cpp',
|
|
|
|
'font-binding.cpp',
|
|
|
|
'graphics-binding.cpp',
|
|
|
|
'input-binding.cpp',
|
|
|
|
'sprite-binding.cpp',
|
|
|
|
'viewport-binding.cpp',
|
|
|
|
'plane-binding.cpp',
|
|
|
|
'window-binding.cpp',
|
|
|
|
'tilemap-binding.cpp',
|
|
|
|
'audio-binding.cpp',
|
|
|
|
'module_rpg.cpp',
|
|
|
|
'filesystem-binding.cpp',
|
|
|
|
'windowvx-binding.cpp',
|
2020-12-30 01:43:40 -05:00
|
|
|
'tilemapvx-binding.cpp',
|
|
|
|
'http-binding.cpp'
|
2019-07-31 08:47:44 -04:00
|
|
|
)]
|
|
|
|
|
2020-02-28 03:23:16 -05:00
|
|
|
if steamworks == true
|
|
|
|
binding_source += files('cusl-binding.cpp')
|
|
|
|
endif
|
|
|
|
|
2019-12-31 13:42:44 -05:00
|
|
|
if miniffi == true
|
|
|
|
binding_source += files('miniffi-binding.cpp')
|
2020-12-31 19:59:53 -05:00
|
|
|
binding_source += files('miniffi.cpp')
|
2019-12-31 13:42:44 -05:00
|
|
|
endif
|
|
|
|
|
2019-12-17 06:22:01 -05:00
|
|
|
global_sources += binding_source
|