Skip to content
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

Add cmake and corresponding toolchain files, add zip, fix $PATH for devkitA64 to work with cmake #4

Closed
wants to merge 3 commits into from
Closed
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
4 changes: 3 additions & 1 deletion devkita64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ MAINTAINER Dave Murphy <davem@devkitpro.org>

RUN dkp-pacman -Syyu --noconfirm switch-dev && \
dkp-pacman -S --needed --noconfirm `dkp-pacman -Slq dkp-libs | grep '^switch-'` && \
dkp-pacman -Scc --noconfirm
dkp-pacman -Scc --noconfirm && \
dkp-pacman -S --needed --noconfirm devkitpro-pkgbuild-helpers

ENV PATH=$DEVKITPRO/devkitA64/bin:$PATH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

devkitA64 should not be in global path. If we do this it then encourages sloppy projects that will cause problems for users. We've already seen this happen with people having multiple arm-none-eabi toolchains installed and attempting to use the wrong one for the wrong project.

Copy link
Author

@rsn8887 rsn8887 Mar 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to make it work with switch.cmake then? I thought the point of switch.cmake was to allow users to compile without manually having to set any paths (apart from having a $DEVKITPRO env var). But I tried, and switch.cmake doesn't find the compilers unless I set the path. So compilation fails.

Copy link
Member

@WinterMute WinterMute Mar 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. The point of switch.cmake is to help compiling ports which require cmake. The point of our Makefile based templates is to allow users to just run make & not care about any setup before building a project. Unfortunately cmake appears incapable of manipulating the environment in the way we manage with our standard Makefiles.

Currently we're sourcing switchvars.sh before running cmake, like this -> https://github.com/devkitPro/pacman-packages/blob/9128546582338c06d4fc11160cc04081823bc310/switch/bulletphysics/PKGBUILD#L20

There is some more discussion on updating the cmake support files here - devkitPro/pacman-packages#64

Like I said on IRC, this is all a WiP and many things still need to be done despite the many things that have already been done.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, understood.

2 changes: 1 addition & 1 deletion toolchain-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get install -y apt-utils && \
apt-get install -y --no-install-recommends sudo ca-certificates pkg-config curl wget bzip2 xz-utils make git bsdtar doxygen gnupg && \
apt-get install -y --no-install-recommends sudo ca-certificates pkg-config curl wget bzip2 xz-utils make cmake git bsdtar doxygen gnupg zip && \
apt-get clean

RUN wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb && \
Expand Down