Lines Matching +full:gcc +full:- +full:i686 +full:- +full:linux +full:- +full:gnu
16 compile_deps and @ref compile_options sections for GLFW-specific information.
25 If you are on a Unix-like system such as Linux, FreeBSD or Cygwin or have
31 [CMake user guide][cmake-guide] that includes everything in this guide not
34 [cmake-guide]: https://cmake.org/cmake/help/latest/guide/user-interaction/
40 all necessary dependencies for compiling GLFW, but on Unix-like systems like
41 Linux and FreeBSD you will need a few extra packages.
46 By default, both the Wayland and X11 backends are enabled on Linux and other Unix-like
55 On Debian and derivatives like Ubuntu and Linux Mint you will need the `libwayland-dev`
56 and `libxkbcommon-dev` packages to compile for Wayland and the `xorg-dev` meta-package to
60 sudo apt install libwayland-dev libxkbcommon-dev xorg-dev
63 On Fedora and derivatives like Red Hat you will need the `wayland-devel` and
64 `libxkbcommon-devel` packages to compile for Wayland and the `libXcursor-devel`,
65 `libXi-devel`, `libXinerama-devel` and `libXrandr-devel` packages to compile for X11.
69 sudo dnf install wayland-devel libxkbcommon-devel libXcursor-devel libXi-devel libXinerama-devel li…
72 On FreeBSD you will need the `wayland`, `libxkbcommon` and `evdev-proto` packages to
73 compile for Wayland. The X11 headers are installed along the end-user X11 packages, so if
78 pkg install wayland libxkbcommon evdev-proto xorgproto
81 On Cygwin Wayland is not supported but you will need the `libXcursor-devel`,
82 `libXi-devel`, `libXinerama-devel`, `libXrandr-devel` and `libXrender-devel` packages to
95 - the path to the root directory of the GLFW source tree (not its `src`
97 - the path to the directory where the generated build files and compiled
100 If these are the same, it is called an in-tree build, otherwise it is called an
101 out-of-tree build.
103 Out-of-tree builds are recommended as they avoid cluttering up the source tree.
120 By default, GLFW will use Wayland and X11 on Linux and other Unix-like systems other than
129 #### Generating with command-line CMake {#compile_generate_cli}
136 cmake -S path/to/glfw -B path/to/build
144 cmake -S . -B build
148 and makefiles on other platforms. You can choose other targets using the `-G`
152 cmake -S path/to/glfw -B path/to/build -G Xcode
155 By default, GLFW will use Wayland and X11 on Linux and other Unix-like systems other than
160 cmake -S path/to/glfw -B path/to/build -D GLFW_BUILD_X11=0
176 With Linux, macOS and other forms of Unix, run `make`.
183 With MinGW, it is `mingw32-make`.
187 mingw32-make
191 `--build` flag.
194 cmake --build path/to/build
210 from there. If you are using the command-line version of CMake you can use the
212 distributions based on Debian GNU/Linux have this tool in a separate
213 `cmake-curses-gui` package.
216 command-line with the `-D` flag.
219 cmake -S path/to/glfw -B path/to/build -D BUILD_SHARED_LIBS=ON
268 variable instead of this GLFW-specific option.
275 high-performance GPU on Nvidia Optimus and AMD PowerXpress systems. These symbols
289 ### Unix-like system specific CMake options {#compile_options_unix}
293 the library. This option is only available when compiling for Linux and other Unix-like
298 library. This option is only available when compiling for Linux and other Unix-like
302 ## Cross-compilation with CMake and MinGW {#compile_mingw_cross}
304 Both Cygwin and many Linux distributions have MinGW or MinGW-w64 packages. For
305 example, Cygwin has the `mingw64-i686-gcc` and `mingw64-x86_64-gcc` packages
306 for 32- and 64-bit version of MinGW-w64, while Debian GNU/Linux and derivatives
307 like Ubuntu have the `mingw-w64` package for both.
310 cross-compilation of Windows binaries. To use these files you set the
311 `CMAKE_TOOLCHAIN_FILE` CMake variable with the `-D` flag add an option when
315 cmake -S path/to/glfw -B path/to/build -D CMAKE_TOOLCHAIN_FILE=path/to/file
319 MinGW-w64 binaries on your system. You can usually see this in the /usr
320 directory. For example, both the Ubuntu and Cygwin MinGW-w64 packages have
321 `/usr/x86_64-w64-mingw32` for the 64-bit compilers, so the correct invocation
325 cmake -S path/to/glfw -B path/to/build -D CMAKE_TOOLCHAIN_FILE=CMake/x86_64-w64-mingw32.cmake
329 passed to the `-S` flag, not to the current directory.
331 For more details see the [CMake toolchain guide][cmake-toolchains].
333 [cmake-toolchains]: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html
339 at least some platform-detection yourself. There are preprocessor macros for
341 platform-specific macros for various features.
344 on the command-line. The GLFW CMake files set these as private compile
351 - @b _GLFW_COCOA to use the Cocoa frameworks
352 - @b _GLFW_WIN32 to use the Win32 API
353 - @b _GLFW_WAYLAND to use the Wayland protocol
354 - @b _GLFW_X11 to use the X Window System
366 _GLFW_GLESV2_LIBRARY. Otherwise, GLFW will use the built-in default names.