Skip to content

Move Wrappers to submodules #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 0 additions & 124 deletions .github/workflows/wrapper.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "wrapper/javascript"]
path = wrapper/javascript
url = https://github.com/Totto16/oopetris_wrapper_js.git
[submodule "wrapper/c"]
path = wrapper/c
url = https://github.com/Totto16/oopetris_wrapper_c.git
1 change: 0 additions & 1 deletion meson.options
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ option(
value: false,
description: 'if you only want to build the libs, enable this',
)

10 changes: 9 additions & 1 deletion src/libs/core/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@ liboopetris_core = library(
install: true,
)

## remove '-stdlib=libc++' from the list, if it's present
core_dep_compile_args = []
foreach value : core_lib.get('compile_args')
if value != '-stdlib=libc++'
core_dep_compile_args += value
endif
endforeach

liboopetris_core_dep = declare_dependency(
link_with: liboopetris_core,
include_directories: core_lib.get('inc_dirs'),
compile_args: core_lib.get('compile_args'),
compile_args: core_dep_compile_args,
dependencies: core_lib.get('deps'),
version: meson.project_version(),
)
Expand Down
31 changes: 20 additions & 11 deletions tools/dependencies/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ only_allow_native_libs = false
if meson.is_cross_build()
if host_machine.system() == 'switch' or host_machine.system() == '3ds'
# we do not link to code that was compiled with gcc 10.1 / gcc 7.1, the code we link with is all compiled with gcc 13.2

temp = core_lib.get('compile_args')
temp += '-Wno-psabi'

core_lib += {
'compile_args': [core_lib.get('compile_args'), '-Wno-psabi'],
'compile_args': temp,
}
temp = 0

only_allow_native_libs = true

Expand Down Expand Up @@ -76,10 +81,14 @@ if not have_std_expected
message('Compiler doesn\'t support std::expected, using fallback')

tl_exp_dep = dependency('tl-expected', required: true)

temp = core_lib.get('compile_args')
temp += '-D_USE_TL_EXPECTED'
core_lib += {
'compile_args': [core_lib.get('compile_args'), '-D_USE_TL_EXPECTED'],
'compile_args': temp,
'deps': [core_lib.get('deps'), tl_exp_dep],
}
temp = 0
endif

# check std::optional support
Expand Down Expand Up @@ -285,20 +294,20 @@ if build_application

endif

core_lib += {
'compile_args': [
core_lib.get('compile_args'),
'-DBUILD_INSTALLER',
],
}
temp = core_lib.get('compile_args')
temp += '-DBUILD_INSTALLER'
core_lib += {'compile_args': temp}
temp = 0

endif

if is_flatpak_build
app_name = 'com.github.mgerhold.OOPetris'
core_lib += {
'compile_args': [core_lib.get('compile_args'), '-DFLATPAK_BUILD'],
}

temp = core_lib.get('compile_args')
temp += '-DFLATPAK_BUILD'
core_lib += {'compile_args': temp}
temp = 0
endif

have_file_dialogs = false
Expand Down
24 changes: 14 additions & 10 deletions tools/options/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ graphics_lib = {
}

if meson.is_cross_build() and host_machine.system() == 'serenity'
core_lib += {
'compile_args': [
core_lib.get('compile_args'),
'-D__SERENITY__',
'-DINSTALL_FILES',
'-DINSTALL_LOCATION=' + get_option('prefix'),
],
}
temp = core_lib.get('compile_args')
temp += [
'-D__SERENITY__',
'-DINSTALL_FILES',
'-DINSTALL_LOCATION=' + get_option('prefix'),
]
core_lib += {'compile_args': temp}
temp = 0
endif

cpp = meson.get_compiler('cpp')
Expand Down Expand Up @@ -68,14 +68,18 @@ elif cpp.get_id() == 'clang'

if build_with_libcpp

temp = core_lib.get('compile_args')
temp += '-stdlib=libc++'

core_lib += {
'compile_args': [core_lib.get('compile_args'), '-stdlib=libc++'],
'compile_args': temp,
'deps': [
core_lib.get('deps'),
cpp.find_library('c++'),
cpp.find_library('c++abi'),
],
}
temp = 0

if not meson.is_subproject()
add_global_link_arguments('-stdlib=libc++', language: ['cpp'])
Expand All @@ -87,7 +91,7 @@ elif cpp.get_id() == 'clang'
endif

else
# TODO: once clang with libstdc++ (gcc c++ stdlib) supports std::expectedt, remove this special behaviour
# TODO: once clang with libstdc++ (gcc c++ stdlib) supports std::expected, remove this special behaviour
allow_tl_expected_fallback = true
endif

Expand Down
4 changes: 3 additions & 1 deletion wrapper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## What is this

This are wrappers of some OOPEtris functionaility in other languages
This are wrappers of some OOPEtris functionaility in other languages.
They are all in submodules alias in a seperate git repo.

They currently wrap this:
- OOPetris Recordings
Expand All @@ -20,6 +21,7 @@ Current:
Planned:
- Python
- Lua
- Java
- Haskell

## Other
Expand Down
1 change: 1 addition & 0 deletions wrapper/c
Submodule c added at dd9876
26 changes: 0 additions & 26 deletions wrapper/c/README.md

This file was deleted.

Loading
Loading