Cleaned up buildscripts and meson.build
This commit is contained in:
@@ -1,4 +0,0 @@
|
|||||||
$sourcedir=$args[0] # root source directory
|
|
||||||
$builddir=$args[1] # root build directory
|
|
||||||
|
|
||||||
cp $sourcedir/subprojects/luajit/src/lua51.dll -Destination $builddir
|
|
||||||
26
buildscripts/meson.build
Normal file
26
buildscripts/meson.build
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
if build_machine.system() == 'windows'
|
||||||
|
# evol dll needs to be copied for each build
|
||||||
|
evoldllcopy = custom_target(
|
||||||
|
'evolDLLCopy',
|
||||||
|
depends: evol_subproj.get_variable('evol_lib'),
|
||||||
|
output: 'evolDLL',
|
||||||
|
command: ['powershell.exe', meson.current_source_dir() + '/evoldllcopy.ps1', meson.project_build_root()],
|
||||||
|
build_by_default: true,
|
||||||
|
)
|
||||||
|
|
||||||
|
# flecs dll needs to be copied to root builddir
|
||||||
|
flecsdllcopy = custom_target(
|
||||||
|
'flecsDLLCopy',
|
||||||
|
output: 'flecsDLL',
|
||||||
|
command: ['powershell.exe', meson.current_source_dir() + '/flecsdllcopy.ps1', meson.project_build_root()],
|
||||||
|
build_by_default: true,
|
||||||
|
)
|
||||||
|
|
||||||
|
# lua dll only needs to be copied in the environment setup
|
||||||
|
run_command('python',
|
||||||
|
meson.project_source_root() / 'subprojects/evol/buildscripts/copy.py',
|
||||||
|
meson.project_source_root() / 'subprojects/luajit/src/lua51.dll', # src
|
||||||
|
meson.project_build_root()) # dst
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
47
meson.build
47
meson.build
@@ -1,46 +1,25 @@
|
|||||||
project('evol-sandbox', 'c',
|
project('evol-sandbox', 'c',
|
||||||
version : '0.1',
|
version : '0.1',
|
||||||
default_options : ['warning_level=3', 'c_std=gnu11'])
|
default_options : [
|
||||||
|
'warning_level=3',
|
||||||
add_global_arguments('-fms-extensions', '-DEV_APP_CONFIG="' + meson.current_source_dir() + '/appconfig.meta"', language: 'c')
|
'c_std=gnu11',
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
evol_subproj = subproject('evol')
|
evol_subproj = subproject('evol')
|
||||||
evol_dep = dependency('evol')
|
evol_dep = dependency('evol')
|
||||||
|
|
||||||
|
# The subproject's sole purpose is to make sure that the modules build
|
||||||
subproject('evmod_glfw')
|
subproject('evmod_glfw')
|
||||||
evmodglfw_dep = dependency('evmod_glfw')
|
|
||||||
|
|
||||||
subproject('evmod_ecs')
|
subproject('evmod_ecs')
|
||||||
evmodecs_dep = dependency('evmod_ecs')
|
|
||||||
|
|
||||||
subproject('evmod_physics')
|
subproject('evmod_physics')
|
||||||
|
|
||||||
|
evmodglfw_dep = dependency('evmod_glfw')
|
||||||
|
evmodecs_dep = dependency('evmod_ecs')
|
||||||
evmodphysics_dep = dependency('evmod_physics')
|
evmodphysics_dep = dependency('evmod_physics')
|
||||||
|
|
||||||
sandbox_incdir = []
|
# Setup build directory
|
||||||
|
subdir('buildscripts')
|
||||||
configure_file(input: 'config.lua', output: 'config.lua', copy: true)
|
|
||||||
|
|
||||||
if build_machine.system() == 'windows'
|
|
||||||
# evol dll needs to be copied for each build
|
|
||||||
evoldllcopy = custom_target(
|
|
||||||
'evolDLLCopy',
|
|
||||||
depends: evol_subproj.get_variable('evol_lib'),
|
|
||||||
output: 'evolDLL',
|
|
||||||
command: ['powershell.exe', meson.current_source_dir() + '/buildscripts/evoldllcopy.ps1', meson.project_build_root()],
|
|
||||||
build_by_default: true,
|
|
||||||
)
|
|
||||||
|
|
||||||
# flecs dll needs to be copied to root builddir
|
|
||||||
flecsdllcopy = custom_target(
|
|
||||||
'flecsDLLCopy',
|
|
||||||
output: 'flecsDLL',
|
|
||||||
command: ['powershell.exe', meson.current_source_dir() + '/buildscripts/flecsdllcopy.ps1', meson.project_build_root()],
|
|
||||||
build_by_default: true,
|
|
||||||
)
|
|
||||||
|
|
||||||
# lua dll only needs to be copied in the environment setup
|
|
||||||
run_command('powershell.exe', meson.current_source_dir() + '/buildscripts/luadllcopy.ps1', meson.project_source_root(), meson.project_build_root())
|
|
||||||
endif
|
|
||||||
|
|
||||||
sandbox_exe = executable(
|
sandbox_exe = executable(
|
||||||
'sandbox',
|
'sandbox',
|
||||||
@@ -52,7 +31,7 @@ sandbox_exe = executable(
|
|||||||
evmodphysics_dep,
|
evmodphysics_dep,
|
||||||
],
|
],
|
||||||
install : true,
|
install : true,
|
||||||
include_directories: sandbox_incdir,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Copy config file
|
||||||
|
configure_file(input: 'config.lua', output: 'config.lua', copy: true)
|
||||||
|
|||||||
Reference in New Issue
Block a user