Skip to content
Open
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
10 changes: 5 additions & 5 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,10 @@ _Follow the steps from [All Development Platforms](#all-development-platforms) b

The minimal requirement target is an OpenGL 3.3 compatible GPU. Clang 9+ or GCC 9+ are required for building.

First step is to install packages mandatory for building. For example, with Clang-9 toolchain:
First step is to install packages mandatory for building. For example, with a GCC toolchain:

```
sudo apt-get install libgl1-mesa-dev libcurl4-openssl-dev clang-9 libc++-9-dev libc++abi-9-dev lld-9 ninja-build
sudo apt-get install libgl1-mesa-dev x11proto-core-dev libx11-dev libcurl4-openssl-dev g++ cmake ninja-build npm
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should add npm here. Depending on how people use npm, it may be installed differently. Same goes for cmake. They are already requirements listed in the All Development Platforms section.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, why switch from CLang to GCC?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since clang is not really required and GCC might be already installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The whole command line gets you into the state where you can build just build. If cmake or npm is not there, something might fail.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, but many people don't install cmake or npm using apt, so this may cause problems for them.

```

Depending on the JavaScript engine you want to use, you will have to install the package accordingly:
Expand All @@ -295,7 +295,7 @@ sudo apt-get install libjavascriptcoregtk-4.1-dev
Then, run cmake targetting a Ninja make file:

```
cmake -G Ninja -D JAVASCRIPTCORE_LIBRARY=/usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.1.so -D NAPI_JAVASCRIPT_ENGINE=JavaScriptCore
cmake -B build/linux -G Ninja -D NAPI_JAVASCRIPT_ENGINE=JavaScriptCore
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cmake -B build/linux -G Ninja -D NAPI_JAVASCRIPT_ENGINE=JavaScriptCore
cmake -B build/linux -G Ninja

JavaScriptCore is also the default now.

```

### V8
Expand All @@ -309,13 +309,13 @@ sudo apt-get install libv8-dev
Then, run cmake targetting a Ninja make file:

```
cmake -G Ninja -D NAPI_JAVASCRIPT_ENGINE=V8
cmake -B build/linux -G Ninja -D NAPI_JAVASCRIPT_ENGINE=V8
```

And finally, for any JavaScript engine, run a build:

```
ninja
cmake --build build/linux
```

You can switch compiler between GCC and Clang by defining shell variables.
Expand Down
Loading