Update files for cross compilation fixes; add dockerfiles for windows/linux/emscripten builds; add commands to makefile to build via dockerfiles
Some checks failed
Build and Deploy / build-macos (push) Failing after 29s
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled
Some checks failed
Build and Deploy / build-macos (push) Failing after 29s
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled
This commit is contained in:
71
meson.build
71
meson.build
@@ -107,16 +107,16 @@ sdl3_opts.add_cmake_defines({
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
if host_machine.system() == 'darwin'
|
||||
deps += dependency('appleframeworks', modules: 'accelerate')
|
||||
add_project_arguments('-DACCELERATE_NEW_LAPACK=1', language:'c')
|
||||
add_project_arguments('-DACCELERATE_LAPACK_ILP64=1', language:'c')
|
||||
# deps += dependency('appleframeworks', modules: 'accelerate')
|
||||
# add_project_arguments('-DACCELERATE_NEW_LAPACK=1', language:'c')
|
||||
# add_project_arguments('-DACCELERATE_LAPACK_ILP64=1', language:'c')
|
||||
endif
|
||||
|
||||
if host_machine.system() == 'linux'
|
||||
deps += cc.find_library('asound', required:true)
|
||||
deps += [dependency('x11'), dependency('xi'), dependency('xcursor'), dependency('egl'), dependency('gl')]
|
||||
deps += cc.find_library('blas', required:true)
|
||||
deps += cc.find_library('lapack', required:true)
|
||||
# deps += cc.find_library('blas', required:true)
|
||||
# deps += cc.find_library('lapacke', required:true)
|
||||
endif
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
@@ -124,11 +124,11 @@ if host_machine.system() == 'windows'
|
||||
deps += cc.find_library('ws2_32', required:true)
|
||||
# For Windows, you may need to install OpenBLAS or Intel MKL
|
||||
# and adjust these library names accordingly
|
||||
deps += cc.find_library('openblas', required:false)
|
||||
if not cc.find_library('openblas', required:false).found()
|
||||
deps += cc.find_library('blas', required:false)
|
||||
deps += cc.find_library('lapack', required:false)
|
||||
endif
|
||||
# deps += cc.find_library('openblas', required:false)
|
||||
# if not cc.find_library('openblas', required:false).found()
|
||||
# deps += cc.find_library('blas', required:false)
|
||||
# deps += cc.find_library('lapacke', required:false)
|
||||
# endif
|
||||
deps += cc.find_library('dbghelp')
|
||||
deps += cc.find_library('winmm')
|
||||
deps += cc.find_library('setupapi')
|
||||
@@ -142,12 +142,43 @@ if host_machine.system() == 'windows'
|
||||
endif
|
||||
|
||||
if host_machine.system() == 'emscripten'
|
||||
link += '-sUSE_WEBGPU'
|
||||
# Use the pre-installed copy
|
||||
deps += dependency('sdl3',
|
||||
static : true,
|
||||
method : 'pkg-config', # or 'cmake' if you prefer
|
||||
required : true)
|
||||
message('⚙ Building SDL3 subproject for Emscripten...')
|
||||
sdl3_opts.append_compile_args(
|
||||
'c',
|
||||
'-pthread',
|
||||
'-sUSE_PTHREADS=1',
|
||||
)
|
||||
sdl3_opts.append_compile_args(
|
||||
'cpp',
|
||||
'-pthread',
|
||||
'-sUSE_PTHREADS=1',
|
||||
)
|
||||
|
||||
# 3. And into every link step
|
||||
sdl3_opts.append_link_args(
|
||||
'-pthread',
|
||||
'-sUSE_PTHREADS=1',
|
||||
'-sPTHREAD_POOL_SIZE=4',
|
||||
)
|
||||
|
||||
sdl3_proj = cmake.subproject('sdl3', options: sdl3_opts)
|
||||
deps += sdl3_proj.dependency('SDL3-static')
|
||||
|
||||
add_project_arguments('-DPATH_MAX=4096', language: 'c')
|
||||
|
||||
add_project_arguments(
|
||||
'-pthread',
|
||||
'-sUSE_PTHREADS=1',
|
||||
'-sPTHREAD_POOL_SIZE=4',
|
||||
language: ['c', 'cpp'])
|
||||
|
||||
add_project_link_arguments(
|
||||
'--use-port=emdawnwebgpu',
|
||||
'-sUSE_PTHREADS=1',
|
||||
'-pthread',
|
||||
'-sPTHREAD_POOL_SIZE=4',
|
||||
'-sMALLOC=mimalloc',
|
||||
language: ['c','cpp'])
|
||||
else
|
||||
# Try to find system-installed SDL3 first
|
||||
sdl3_dep = dependency('sdl3', static: true, required: false)
|
||||
@@ -179,7 +210,7 @@ else
|
||||
endif
|
||||
|
||||
deps += dependency('threads')
|
||||
deps += dependency('mimalloc')
|
||||
|
||||
|
||||
# Try to find system-installed chipmunk first
|
||||
chipmunk_dep = dependency('chipmunk', static: true, required: false)
|
||||
@@ -200,8 +231,10 @@ if host_machine.system() != 'emscripten'
|
||||
deps += enet_dep
|
||||
endif
|
||||
src += 'qjs_enet.c'
|
||||
|
||||
deps += dependency('mimalloc')
|
||||
|
||||
tracy_opts = ['fibers=true', 'no_exit=true', 'libunwind_backtrace=true', 'on_demand=true']
|
||||
tracy_opts = ['fibers=true', 'no_exit=true', 'on_demand=true']
|
||||
add_project_arguments('-DTRACY_ENABLE', language:['c','cpp'])
|
||||
|
||||
# Try to find system-installed tracy first
|
||||
@@ -271,7 +304,7 @@ src += [
|
||||
'anim.c', 'config.c', 'datastream.c','font.c','HandmadeMath.c','jsffi.c','model.c',
|
||||
'render.c','simplex.c','spline.c', 'transform.c','cell.c', 'wildmatch.c',
|
||||
'sprite.c', 'rtree.c', 'qjs_nota.c', 'qjs_soloud.c', 'qjs_sdl.c', 'qjs_sdl_input.c', 'qjs_sdl_video.c', 'qjs_sdl_surface.c', 'qjs_math.c', 'qjs_geometry.c', 'qjs_transform.c', 'qjs_sprite.c', 'qjs_io.c', 'qjs_fd.c', 'qjs_os.c', 'qjs_actor.c',
|
||||
'qjs_qr.c', 'qjs_wota.c', 'monocypher.c', 'qjs_blob.c', 'qjs_crypto.c', 'qjs_time.c', 'qjs_http.c', 'qjs_rtree.c', 'qjs_spline.c', 'qjs_js.c', 'qjs_debug.c', 'picohttpparser.c', 'qjs_miniz.c', 'qjs_num.c', 'timer.c', 'qjs_socket.c', 'qjs_kim.c', 'qjs_utf8.c', 'qjs_fit.c', 'qjs_text.c', 'qjs_layout.c'
|
||||
'qjs_qr.c', 'qjs_wota.c', 'monocypher.c', 'qjs_blob.c', 'qjs_crypto.c', 'qjs_time.c', 'qjs_http.c', 'qjs_rtree.c', 'qjs_spline.c', 'qjs_js.c', 'qjs_debug.c', 'picohttpparser.c', 'qjs_miniz.c', 'timer.c', 'qjs_socket.c', 'qjs_kim.c', 'qjs_utf8.c', 'qjs_fit.c', 'qjs_text.c', 'qjs_layout.c'
|
||||
]
|
||||
# quirc src
|
||||
src += [
|
||||
|
||||
Reference in New Issue
Block a user