The Swift Package Manager has some options.
You can see the usage using `$ swift build --help` command.
The `-C`option makes `$ swift build` available for your project in another directory.
OPTIONS:
β chdir <value> Change working directory before any other operation [-C]
Example
Let's suppose your current directory is not the root of your project.
To build your project with `$ swift build`, run the following command in the current directory.
$ swift build -C <PathToRootOfYourProject>
You don't need to run `$ cd <PathToRootOfYourProject>` command. π