Skip to content

Commit

Permalink
Use ninja to build directly
Browse files Browse the repository at this point in the history
  • Loading branch information
dcvz committed Aug 4, 2022
1 parent e49fe05 commit edcd39d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ cp <path to your ROM> OTRExporter
# Generate Ninja project
cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE=Release (if you're packaging)
# Compile the project
cmake --build build-cmake -- -j$(nproc)
(cd build-cmake && ninja)

# Now you can run the executable in ./build-cmake/soh/soh.elf
# To develop the project open the repository in VSCode (or your preferred editor)
Expand Down Expand Up @@ -66,7 +66,7 @@ cp <path to your ROM> OTRExporter
# Generate Ninja project
cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE=Release (if you're packaging)
# Compile the project
cmake --build build-cmake -- -j$(sysctl -n hw.ncpu)
(cd build-cmake && ninja)

# Now you can run the executable in ./build-cmake/soh/soh-macos
# To develop the project open the repository in VSCode (or your preferred editor)
Expand All @@ -90,13 +90,13 @@ cpack
```bash
cd Shipwright
# Setup cmake project for your host machine
cmake -H. -Bbuild-cmake -GNinja -- -j$(sysctl -n hw.ncpu) # Linux: -j$(nproc)
cmake -H. -Bbuild-cmake -GNinja
# Extract necessary assets
cmake --build build-cmake --target ExtractAssets
(cd build-cmake && ninja ExtractAssets)
# Setup cmake project for building for Switch
cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake
# Build project and generate nro
cmake --build build-switch --target soh_nro -- -j$(sysctl -n hw.ncpu) # Linux: -j$(nproc)
(cd build-switch && ninja soh_nro)

# Now you can run the executable in ./build-switch/soh/soh.nro
# To develop the project open the repository in VSCode (or your preferred editor)
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pipeline {
cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cmake --build build-cmake -- -j$(sysctl -n hw.ncpu)
(cd build-cmake && ninja)
(cd build-cmake && cpack)
mv README.md readme.txt
Expand Down
2 changes: 1 addition & 1 deletion scripts/linux/appimage/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

cmake -H. -Bbuild-cmake -GNinja
cmake --build build-cmake -- -j$(nproc)
(cd build-cmake && ninja)

(cd build-cmake && cpack -G External)
4 changes: 2 additions & 2 deletions scripts/switch/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

cmake -H. -Bbuild-linux -GNinja
cmake --build build-linux --target ExtractAssets -- -j$(nproc)
(cd build-linux && ninja ExtractAssets)

cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake
cmake --build build-switch --target soh_nro -- -j$(nproc)
(cd build-switch && ninja soh_nro)

0 comments on commit edcd39d

Please sign in to comment.