Skip to content

Commit

Permalink
switch-next: Build with CMake (#334)
Browse files Browse the repository at this point in the history
* Update CMake/Findsodium.cmake from upstream
* CMake/Findsodium.cmake: Support "Generic" platform
Allows it work using the Switch toolchain
* Switch port: Code changes for latest devkitpro
* switch/build.sh: Fewer devkitpro packages
  • Loading branch information
glebm authored and AJenbo committed Oct 13, 2019
1 parent 0c89f9e commit 3d51b17
Show file tree
Hide file tree
Showing 15 changed files with 795 additions and 842 deletions.
10 changes: 8 additions & 2 deletions .circleci/config.yml
Expand Up @@ -64,8 +64,14 @@ jobs:
working_directory: ~/repo
steps:
- checkout
- run: make -j$(nproc)
- store_artifacts: {path: ./release/devilutionx.nro, destination: devilutionx.nro}
- run: echo deb http://deb.debian.org/debian stretch-backports main > /etc/apt/sources.list.d/debian-backports.list
- run: apt-get update && apt-get install -y -t stretch-backports cmake
# Install cmake files (https://github.com/devkitPro/docker/issues/3)
- run: dkp-pacman -S --needed --noconfirm --quiet devkitpro-pkgbuild-helpers
# NOTE: Doesn't link without LTO ("read-only segment has dynamic relocations").
- run: cd build && cmake .. -DBINARY_RELEASE=ON -DNONET=ON -DCMAKE_TOOLCHAIN_FILE=../CMake/switch/devkita64-libnx.cmake
- run: cd build && cmake --build . -j $(nproc)
- store_artifacts: {path: ./build/devilutionx.nro, destination: devilutionx.nro}

workflows:
version: 2
Expand Down
3 changes: 2 additions & 1 deletion 3rdParty/StormLib/src/StormPort.h
Expand Up @@ -157,6 +157,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <strings.h>
#include <ctype.h>
#include <assert.h>
#include <errno.h>
Expand Down Expand Up @@ -271,7 +272,7 @@
#endif // !PLATFORM_WINDOWS

// 64-bit calls are supplied by "normal" calls on Mac
#if defined(PLATFORM_MAC) || defined(PLATFORM_HAIKU) || defined(PLATFORM_AMIGA) || defined(PLATFORM_NX)
#if defined(PLATFORM_MAC) || defined(PLATFORM_HAIKU) || defined(PLATFORM_AMIGA) || defined(PLATFORM_SWITCH)
#define stat64 stat
#define fstat64 fstat
#define lseek64 lseek
Expand Down

0 comments on commit 3d51b17

Please sign in to comment.