Skip to content

Commit 01ccb96

Browse files
authored
Merge pull request #1 from cortex-command-community/meson-fixes
Meson updates for monorepo
2 parents 148090b + e56c4c4 commit 01ccb96

File tree

6 files changed

+10
-32
lines changed

6 files changed

+10
-32
lines changed

external/sources/luabind-0.7.1/meson.build

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,12 @@ elif cxx.get_argument_syntax() == 'msvc'
2020
cpp_options = ['cpp_std=vc++20']
2121
endif
2222

23-
if not get_option('use_prebuilt_libraries') or host_machine.system() in ['darwin', 'linux']
24-
luabind = static_library('luabind071', luabind_src, dependencies: luabind_dependencies, include_directories:luabind_include, cpp_args:cpp_args+ luabind_args, override_options: ['warning_level=0']+ cpp_options)
25-
else
26-
luabind = []
27-
if get_option('debug')
28-
deps = cxx.find_library('luabind-debug' , dirs: meson.current_source_dir()/'_Bin')
29-
else
30-
deps = cxx.find_library('luabind-release', dirs: meson.current_source_dir()/'_Bin')
31-
endif
23+
if (not get_option('debug')) or get_option('debug_type') == 'release'
24+
luabind_args += ['-DLUABIND_NO_ERROR_CHECKING=1']
3225
endif
3326

27+
luabind = static_library('luabind071', luabind_src, dependencies: luabind_dependencies, include_directories:luabind_include, cpp_args:cpp_args+ luabind_args, override_options: ['warning_level=0']+ cpp_options)
28+
3429
luabind_dep = declare_dependency(link_with: luabind, dependencies: deps, include_directories: luabind_include, compile_args: luabind_args)
3530

3631
meson.override_dependency('luabind', luabind_dep)
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
option('use_prebuilt_libraries', type: 'boolean', value: true, yield: true, description: 'On windows use the prebuilt libraries')
1+
option('use_prebuilt_libraries', type: 'boolean', value: true, yield: true, description: 'On windows use the prebuilt libraries')
2+
option('debug_type', type: 'combo', choices: ['full','minimal','release'], value:'minimal', yield: true, description: 'Enable certain Debug features, that might slow down the game')

meson.build

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ elif compiler.get_argument_syntax()== 'msvc'
7373
message('cl detected')
7474
elfname = 'Cortex Command'
7575
extra_args += ['-D_HAS_ITERATOR_DEBUGGING=0', '-D_HAS_AUTO_PTR_ETC=1', '-bigobj']
76+
add_global_arguments('-D_ITERATOR_DEBUG_LEVEL=0', language:'cpp')
7677
add_project_link_arguments(['winmm.lib', 'ws2_32.lib', 'dinput8.lib', 'ddraw.lib', 'dxguid.lib', 'dsound.lib', 'dbghelp.lib'], language:'cpp')
7778
if host_machine.cpu_family() == 'x86'
7879
elfname += ' x86'
@@ -246,9 +247,9 @@ base_exclude_files = [
246247
]
247248

248249
if get_option('install_data')
249-
install_subdir(get_option('cccpdatadir'),
250-
exclude_directories:['.git', '.github', 'Metagames.rte', 'Scenes.rte'],
250+
install_subdir('Data',
251+
exclude_directories:['.git', '.github'],
251252
exclude_files:base_exclude_files,
252-
install_dir:get_option('data_install_dir'),
253+
install_dir:get_option('data_install_dir')/'Data',
253254
strip_directory:true)
254255
endif

meson_darwin.ini

Lines changed: 0 additions & 14 deletions
This file was deleted.

meson_options.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
option('debug_type', type: 'combo', choices: ['full','minimal','release'], value:'minimal', description: 'Enable certain Debug features, that might slow down the game')
2-
option('cccpdatadir', type:'string', value:'.', description: 'Path to the Cortex Command Data Repository')
32
option('data_install_dir', type:'string', value:'share/CortexCommand', description: 'Where to install the data files relative to prefix directory')
43
option('install_fmod', type:'boolean', value: true, description: 'Wether to install the fmod library.')
54
option('fmod_dir', type:'string', value:'lib/CortexCommand/', description: 'Where to install the fmod library relative to prefix directory.')

meson_win.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)