@@ -4,7 +4,8 @@ Building from source
4
4
Have Pip build from source
5
5
--------------------------
6
6
7
- This is useful if the binaries don’t work on your system, or you want to use a newer version of Raylib.
7
+ This is useful if the binaries don’t work on your system, or you want to use a newer version of Raylib, or compile
8
+ Raylib with a different version of OpenGL than the default. (e.g. on old hardware use cmake option ``-DOPENGL_VERSION=1.1 ``)
8
9
9
10
First make sure Raylib is installed. On Linux/Mac it must include the pkg-config files. Best way to ensure this
10
11
is to compile and install Raylib using CMake: https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake
@@ -13,21 +14,47 @@ Requirements for build: cmake, pkg-config.
13
14
14
15
::
15
16
16
- cd raylib-5.0
17
- mkdir build
18
- cd build
19
- cmake -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
20
- make
21
- sudo make install
22
-
23
-
17
+ wget https://github.com/raysan5/raylib/archive/refs/tags/5.5.zip
18
+ unzip 5.5.zip
19
+ cd raylib-5.5
20
+ mkdir build
21
+ cd build
22
+ cmake -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
23
+ make
24
+ sudo make install
25
+ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
24
26
25
27
Then ask Pip to build from source:
26
28
27
29
::
28
30
29
31
pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall raylib
30
32
33
+ Environment variables (new in 5.5.0.3)
34
+ --------------------------------------
35
+
36
+ If plg-config doesn't work you can manually set these environment variables:
37
+
38
+ ``RAYLIB_PLATFORM ``: Any one of: ``Desktop ``, ``SDL ``, ``DRM ``, ``PLATFORM_COMMA ``
39
+
40
+ ``RAYLIB_LINK_ARGS ``: Arguments to pass to the linker rather than getting them from pkg-config.
41
+ e.g.: ``"-L/usr/local/lib -lraylib" ``
42
+
43
+ ``RAYLIB_INCLUDE_PATH ``: Directory to find raylib.h rather than getting from pkg-config.
44
+ e.g.: ``/usr/local/include ``
45
+
46
+ ``RAYGUI_INCLUDE_PATH ``: Directory to find raygui.h
47
+ e.g.: ``/usr/local/include ``
48
+
49
+ ``GLFW_INCLUDE_PATH ``: Directory to find glfw3.h
50
+ e.g.: ``/usr/local/include/GLFW ``
51
+
52
+ ``PHYSAC_INCLUDE_PATH ``: Directory to find physac.h
53
+ e.g.: ``/usr/local/include ``
54
+
55
+ ``LIBFFI_INCLUDE_PATH ``:
56
+ e.g.: ``/usr/local/include ``
57
+
31
58
Or, Build from source manually
32
59
------------------------------
33
60
@@ -116,6 +143,7 @@ Build and install Raylib from the raylib-c directory.
116
143
cd build
117
144
cmake -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
118
145
sudo make install
146
+ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
119
147
120
148
.. note :: Optional: Build the Raylib shared libs, if you plan to use
121
149
``raylib_dynamic `` binding.
0 commit comments