mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Building_Linux.md: Use cmake -S ../vcmi
instead of cmake ../vcmi
This commit is contained in:
parent
a2bd3f5b46
commit
efb021333b
@ -49,12 +49,14 @@ Information about building packages from the Arch User Repository (AUR) can be f
|
||||
|
||||
# Getting the sources
|
||||
|
||||
VCMI is still in development. We recommend the following initial directory structure:
|
||||
We recommend the following directory structure:
|
||||
|
||||
.
|
||||
├── vcmi -> contains sources and is under git control
|
||||
└── build -> contains build output, makefiles, object files,...
|
||||
|
||||
Out-of-source builds keep the local repository clean so one doesn't have to manually exclude files generated during the build from commits.
|
||||
|
||||
You can get latest sources with:
|
||||
|
||||
`git clone -b develop --recursive https://github.com/vcmi/vcmi.git`
|
||||
@ -65,25 +67,25 @@ You can get latest sources with:
|
||||
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
cmake ../vcmi
|
||||
cmake -S ../vcmi
|
||||
```
|
||||
|
||||
# Additional options that you may want to use:
|
||||
|
||||
## To enable debugging:
|
||||
`cmake ../vcmi -D CMAKE_BUILD_TYPE=Debug`
|
||||
`cmake -S ../vcmi -D CMAKE_BUILD_TYPE=Debug`
|
||||
|
||||
**Notice**: The ../vcmi/ is not a typo, it will place makefile scripts into the build dir as the build dir is your working dir when calling CMake.
|
||||
|
||||
## To use ccache:
|
||||
`cmake ../vcmi -D ENABLE_CCACHE:BOOL=ON`
|
||||
`cmake -S ../vcmi -D ENABLE_CCACHE:BOOL=ON`
|
||||
|
||||
## Trigger build
|
||||
|
||||
`cmake --build . -- -j2`
|
||||
(-j2 = compile with 2 threads, you can specify any value)
|
||||
|
||||
That will generate vcmiclient, vcmiserver, vcmilauncher as well as .so libraries in **build/bin/** directory.
|
||||
That will generate vcmiclient, vcmiserver, vcmilauncher as well as .so libraries in the **build/bin/** directory.
|
||||
|
||||
# Package building
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user