Skip to content

Commit

Permalink
Fix out of tree builds
Browse files Browse the repository at this point in the history
This allows the build directory to be located outside of the source tree.
Arguably, this has no tangible benefit, but it's more "proper" in the
meson spirit.

Depends on the following PRs:
- pret#155
- ntrtwl/libvct#1
- ntrtwl/NitroDWC#2
- ntrtwl/NitroSDK#1
- ntrtwl/NitroWiFi#1
  • Loading branch information
mid-kid committed Mar 8, 2024
1 parent a9f6bc4 commit 69f4fd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
uses: actions/checkout@v2

- name: Configure Repo
run: ./config.sh
run: ./config.sh /var/tmp/pokeplatinum

- name: Build Repo
run: ./build.sh test
run: meson compile -C /var/tmp/pokeplatinum test

- name: Webhook
if: ${{ github.event_name == 'push' }}
Expand Down
6 changes: 0 additions & 6 deletions tools/postconf/postconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ def main():
build_ninja_string = backslash_to_forward_slash(build_ninja_string)
build_ninja_string = fix_static_libs(build_ninja_string)
build_ninja_string = nasm_to_asm(build_ninja_string)
build_ninja_string = relativize_prebuilt_lib_paths(build_ninja_string)

# compile_commands.json edits
compile_commands_string = backslash_to_forward_slash(compile_commands_string)
compile_commands_string = relativize_prebuilt_lib_paths(compile_commands_string)

# For WSL accessing Windows, paths to PCH input files must be relative
if is_wsl_accessing_windows():
Expand All @@ -53,10 +51,6 @@ def main():
def nasm_to_asm(fileString: str) -> str:
return fileString.replace('Nasm', 'ASM')

def relativize_prebuilt_lib_paths(fileString: str) -> str:
'''Make paths to prebuilt .a files relative'''
return re.sub(r'/[\w/\-.]+?(subprojects[\w/\-.]+?prebuilt)', r'../\1', fileString)

def relativize_pch_paths(fileString: str) -> str:
'''Make paths to headers to be precompiled relative (for WSL)'''
return re.sub(r'c_PCH [\w/\-.]+?subprojects', r'c_PCH ../subprojects', fileString)
Expand Down

0 comments on commit 69f4fd5

Please sign in to comment.