Skip to content

Commit

Permalink
update readme with notes on Clang compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
otavepto committed Jun 2, 2024
1 parent 649e90b commit cfbeff9
Showing 1 changed file with 37 additions and 11 deletions.
48 changes: 37 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,35 @@ Open CMD in the repo folder, then run the following
set "CMAKE_GENERATOR=Visual Studio 17 2022"
third-party\common\win\premake\premake5.exe --file=premake5-deps.lua --64-build --32-build --all-ext --all-build --verbose --os=windows vs2022
```
* To build 64-bit binaries using `MSYS2` (`UCRT64` or `MINGW64`)
```shell
export CMAKE_GENERATOR="MSYS Makefiles"
./third-party/common/win/premake/premake5.exe --file=premake5-deps.lua --64-build --all-ext --all-build --verbose --os=windows gmake2
```
* To build 32-bit binaries using `MSYS2` (`MINGW32`)
```shell
export CMAKE_GENERATOR="MSYS Makefiles"
./third-party/common/win/premake/premake5.exe --file=premake5-deps.lua --32-build --all-ext --all-build --verbose --os=windows gmake2
```
* To build using `MSYS2`
*(Optional)* In both cases below, you can use `Clang` compiler instead of `GCC` by running these 2 commands in the same terminal instance
```shell
export CC="clang"
export CXX="clang++"
```
* To build 64-bit binaries (`UCRT64` or `MINGW64`)
```shell
export CMAKE_GENERATOR="MSYS Makefiles"
./third-party/common/win/premake/premake5.exe --file=premake5-deps.lua --64-build --all-ext --all-build --verbose --os=windows gmake2
```
* To build 32-bit binaries (`MINGW32`)
```shell
export CMAKE_GENERATOR="MSYS Makefiles"
./third-party/common/win/premake/premake5.exe --file=premake5-deps.lua --32-build --all-ext --all-build --verbose --os=windows gmake2
```

This will:
* Extract all third party dependencies from the folder `third-party` into the folder `build\deps\win`
* Build all dependencies

#### On Linux:
Open a terminal in the repo folder, then run the following
Open a terminal in the repo folder
*(Optional)* You can use `Clang` compiler instead of `GCC` by running these 2 commands in the current terminal instance
```shell
export CC="clang"
export CXX="clang++"
```
Then run the following
```shell
export CMAKE_GENERATOR="Unix Makefiles"
./third-party/common/linux/premake/premake5 --file=premake5-deps.lua --64-build --32-build --all-ext --all-build --verbose --os=linux gmake2
Expand All @@ -154,6 +167,11 @@ Open CMD in the repo folder, then run the following
cd ./build/project/gmake2/win
```
*(Optional)* You can use `Clang` compiler instead of `GCC` by running these 2 commands in the current terminal instance
```shell
export CC="clang"
export CXX="clang++"
```
* 64-bit build (`UCRT64` or `MINGW64`)
```shell
make config=release_x64 -j 8 all
Expand Down Expand Up @@ -188,6 +206,14 @@ Open a terminal in the repo folder, then run the following
```shell
./third-party/common/linux/premake/premake5 --file=premake5.lua --os=linux gmake2
cd ./build/project/gmake2/linux
```
*(Optional)* You can use `Clang` compiler instead of `GCC` by running these 2 commands in the current terminal instance
```shell
export CC="clang"
export CXX="clang++"
```
Then run the following
```shell
make config=release_x32 -j 8 all
make config=release_x64 -j 8 all
```
Expand Down

0 comments on commit cfbeff9

Please sign in to comment.