diff options
author | dundargoc <gocdundar@gmail.com> | 2023-12-16 21:07:28 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-12-16 21:49:00 +0100 |
commit | 2b1bc94b768cb13801e7166f6b02bd09caa3c18f (patch) | |
tree | d80c3cd736640df71e6979a7491828261840bccc | |
parent | 404fdb0f3683094c2d40e1ee7e41d5c491f41a06 (diff) | |
download | rneovim-2b1bc94b768cb13801e7166f6b02bd09caa3c18f.tar.gz rneovim-2b1bc94b768cb13801e7166f6b02bd09caa3c18f.tar.bz2 rneovim-2b1bc94b768cb13801e7166f6b02bd09caa3c18f.zip |
docs: simplify build instructions
-rw-r--r-- | BUILD.md | 70 |
1 files changed, 24 insertions, 46 deletions
@@ -141,25 +141,17 @@ https://github.com/cascent/neovim-cygwin was built on Cygwin 2.9.0. Newer `libuv 3. You have two options: - Build using `cmake` and `Ninja` generator: ```cmd - mkdir .deps - cd .deps - cmake -G Ninja ..\cmake.deps\ - ninja - cd .. - - mkdir build - cd build - cmake -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo .. - ninja - ninja install + cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo + cmake --build .deps + cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo + cmake --build build ``` If you cannot install neovim with `ninja install` due to permission restriction, you can install neovim in a directory you have write access to. ```cmd - mkdir build - cd build - cmake -G Ninja -D CMAKE_INSTALL_PREFIX=C:\nvim -D CMAKE_BUILD_TYPE=RelWithDebInfo .. - ninja - ninja install + cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo + cmake --build .deps + cmake -B build -G Ninja -D CMAKE_INSTALL_PREFIX=C:\nvim -D CMAKE_BUILD_TYPE=RelWithDebInfo + cmake --build build ``` - Or, alternatively, you can use `mingw32-make`: ```cmd @@ -246,41 +238,32 @@ Reference the [Debian package](https://packages.debian.org/sid/source/neovim) (o To build the bundled dependencies using CMake: ```sh -mkdir .deps -cd .deps -cmake ../cmake.deps -make +cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo +cmake --build .deps ``` By default the libraries and headers are placed in `.deps/usr`. Now you can build Neovim: ```sh -mkdir build -cd build -cmake .. -make +cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo +cmake --build build ``` ### How to build without "bundled" dependencies 1. Manually install the dependencies: - libuv libluv libtermkey luajit lua-lpeg lua-mpack msgpack-c tree-sitter unibilium -2. Do the "CMake dance": create a `build` directory, switch to it, and run CMake: +2. Run CMake: ```sh - mkdir build - cd build - cmake .. + cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo + cmake --build build ``` If all the dependencies are not available in the package, you can use only some of the bundled dependencies as follows (example of using `ninja`): ```sh - mkdir .deps - cd .deps - cmake ../cmake.deps/ -DUSE_BUNDLED=OFF -DUSE_BUNDLED_LIBVTERM=ON -DUSE_BUNDLED_TS=ON - ninja - cd .. - mkdir build - cd build - cmake .. + cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_BUNDLED=OFF -DUSE_BUNDLED_LIBVTERM=ON -DUSE_BUNDLED_TS=ON + cmake --build .deps + cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo + cmake --build build ``` 3. Run `make`, `ninja`, or whatever build tool you [told CMake to generate](#xcode-and-msvc-project-files). - Using `ninja` is strongly recommended. @@ -289,15 +272,10 @@ make ```sh sudo apt install luajit libluajit-5.1-dev lua-mpack lua-lpeg libunibilium-dev libmsgpack-dev libtermkey-dev -mkdir .deps -cd .deps -cmake ../cmake.deps/ -DUSE_BUNDLED=OFF -DUSE_BUNDLED_LIBUV=ON -DUSE_BUNDLED_LUV=ON -DUSE_BUNDLED_LIBVTERM=ON -DUSE_BUNDLED_TS=ON -G Ninja -ninja -cd .. -mkdir build -cd build -cmake .. -ninja +cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_BUNDLED=OFF -DUSE_BUNDLED_LIBUV=ON -DUSE_BUNDLED_LUV=ON -DUSE_BUNDLED_LIBVTERM=ON -DUSE_BUNDLED_TS=ON +cmake --build .deps +cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo +cmake --build build ``` #### Example of using a Makefile @@ -316,7 +294,7 @@ ninja General requirements (see [#1469](https://github.com/neovim/neovim/issues/1469#issuecomment-63058312)): - Clang or GCC version 4.9+ -- CMake version 3.10+, built with TLS/SSL support +- CMake version 3.13+, built with TLS/SSL support - Optional: Get the latest CMake from an [installer](https://github.com/Kitware/CMake/releases) or the [Python package](https://pypi.org/project/cmake/) (`pip install cmake`) Platform-specific requirements are listed below. |