refactor(build): Using meson devenv makes copying libgcc unnecessary while cross-compiling
All checks were successful
Ubuntu Cross to Win64 / Cross Compile with ming64 (1.4.0, ubuntu-latest) (push) Successful in 2m13s
All checks were successful
Ubuntu Cross to Win64 / Cross Compile with ming64 (1.4.0, ubuntu-latest) (push) Successful in 2m13s
This commit is contained in:
parent
9f94ac40ee
commit
92fbe1ece4
@ -37,6 +37,7 @@ jobs:
|
|||||||
chmod +x ./scripts/download_dxc_cross.sh
|
chmod +x ./scripts/download_dxc_cross.sh
|
||||||
./scripts/download_dxc_cross.sh
|
./scripts/download_dxc_cross.sh
|
||||||
meson setup --cross-file scripts/x86_64-w64-mingw32.txt -Db_sanitize=none build
|
meson setup --cross-file scripts/x86_64-w64-mingw32.txt -Db_sanitize=none build
|
||||||
|
cd build && meson devenv && cd ..
|
||||||
- name: Compile
|
- name: Compile
|
||||||
run: meson compile -C build
|
run: meson compile -C build
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
|
13
meson.build
13
meson.build
@ -58,7 +58,8 @@ if build_machine.system() == 'linux' and host_machine.system() == 'windows'
|
|||||||
message('Adding /usr/share/mingw-w64/include to the project include path.')
|
message('Adding /usr/share/mingw-w64/include to the project include path.')
|
||||||
add_project_arguments(['-isystem/usr/share/mingw-w64/include',
|
add_project_arguments(['-isystem/usr/share/mingw-w64/include',
|
||||||
'-DRT_CROSS_LINUX_WINDOWS',
|
'-DRT_CROSS_LINUX_WINDOWS',
|
||||||
'-D_WIN32_WINNT=0x600'],
|
'-D_WIN32_WINNT=0x600',
|
||||||
|
'-lgcc'],
|
||||||
language: ['c', 'cpp'],
|
language: ['c', 'cpp'],
|
||||||
native: false)
|
native: false)
|
||||||
endif
|
endif
|
||||||
@ -133,13 +134,3 @@ if get_option('game_as_subdir')
|
|||||||
endforeach
|
endforeach
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# For Cross builds, we need libgcc from mingw
|
|
||||||
if build_machine.system() == 'linux' and host_machine.system() == 'windows'
|
|
||||||
custom_target('copy libgcc',
|
|
||||||
input : '/usr/lib/gcc/x86_64-w64-mingw32/10-win32/libgcc_s_seh-1.dll',
|
|
||||||
output : 'libgcc_s_seh-1.dll',
|
|
||||||
command : [copy_util, '@INPUT@', '@OUTPUT@'],
|
|
||||||
build_by_default : true)
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
#include <meshoptimizer.h>
|
#include <meshoptimizer.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4530)
|
#pragma warning(disable : 4530)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TINYOBJLOADER_IMPLEMENTATION
|
#define TINYOBJLOADER_IMPLEMENTATION
|
||||||
#include <tiny_obj_loader.h>
|
#include <tiny_obj_loader.h>
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "meshlet_generator.hpp"
|
#include "meshlet_generator.hpp"
|
||||||
#include <runtime/mem_arena.h>
|
#include <runtime/mem_arena.h>
|
||||||
|
@ -98,7 +98,7 @@ shader shader::CompileFile(const char *compute_path) {
|
|||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
sh = CompileSource(buf);
|
sh = CompileSource(buf);
|
||||||
delete buf;
|
delete[] buf;
|
||||||
return sh;
|
return sh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
glfw_proj = subproject('glfw', default_options: ['default_library=static', 'b_sanitize=none'])
|
glfw_proj = subproject('glfw', default_options: ['default_library=static', 'b_sanitize=none'])
|
||||||
glfw_dep = glfw_proj.get_variable('glfw_dep')
|
glfw_dep = glfw_proj.get_variable('glfw_dep')
|
||||||
imgui_proj = subproject('imgui')
|
imgui_proj = subproject('imgui', default_options: ['warning_level=0', 'werror=false'])
|
||||||
imgui_dep = imgui_proj.get_variable('imgui_dep')
|
imgui_dep = imgui_proj.get_variable('imgui_dep')
|
||||||
glm_proj = subproject('glm')
|
glm_proj = subproject('glm')
|
||||||
glm_dep = glm_proj.get_variable('glm_dep')
|
glm_dep = glm_proj.get_variable('glm_dep')
|
||||||
|
@ -9,9 +9,20 @@
|
|||||||
#pragma warning Are you sure that you want to include this file ?
|
#pragma warning Are you sure that you want to include this file ?
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _Maybenull_
|
||||||
#define _Maybenull_
|
#define _Maybenull_
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _In_opt_count_
|
||||||
#define _In_opt_count_(n)
|
#define _In_opt_count_(n)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _In_bytecount_
|
||||||
#define _In_bytecount_(n)
|
#define _In_bytecount_(n)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _In_count_
|
||||||
#define _In_count_(n)
|
#define _In_count_(n)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user