summaryrefslogtreecommitdiff
path: root/README.Unix.txt
diff options
context:
space:
mode:
Diffstat (limited to 'README.Unix.txt')
-rw-r--r--README.Unix.txt115
1 files changed, 56 insertions, 59 deletions
diff --git a/README.Unix.txt b/README.Unix.txt
index 442ebf4ca..07ddc113c 100644
--- a/README.Unix.txt
+++ b/README.Unix.txt
@@ -32,20 +32,21 @@ README.Unix.txt - Building FLTK on Unix/Linux Systems
-------------------------------------------------------------------
- Note: usage of autotools, configure, and included Makefiles to
- build the FLTK library is no longer available since FLTK 1.5.0.
- You must use CMake instead, see below and/or README.CMake.txt.
+ Note: This fork uses a simple Makefile-based build system.
+ CMake is no longer used. See section 3 for build instructions.
-------------------------------------------------------------------
1 Introduction
=================
+This FLTK fork uses a simple Makefile-based build system. It supports
+X11-only builds with either Cairo+Pango or pure Xlib+Xft rendering.
+
FLTK currently supports the following development environments on most Unix
and Linux platforms:
- - CMake + the build system of your choice (see README.CMake.txt)
- - gcc command line tools
+ - make + gcc command line tools
- Code::Blocks
- ...
@@ -79,30 +80,26 @@ If you have not done so yet, download and install the distribution of your choic
Open a shell and install some development software:
- sudo apt-get install g++
- sudo apt-get install gdb
- sudo apt-get install git
- sudo apt-get install make # if used
- sudo apt-get install cmake
- sudo apt-get install libx11-dev
- sudo apt-get install libglu1-mesa-dev
- sudo apt-get install libxft-dev
- sudo apt-get install libxcursor-dev
+ sudo apt-get install g++ make gdb git
+
+# Core X11 dependencies (always required):
+
+ sudo apt-get install libx11-dev libxext-dev libxft-dev
+ sudo apt-get install libxinerama-dev libxcursor-dev
+ sudo apt-get install libxfixes-dev libxrender-dev
+ sudo apt-get install libfontconfig1-dev libfreetype-dev
-# These packages are optional but recommended:
+# For Cairo+Pango rendering (USE_CAIRO=1, default):
+
+ sudo apt-get install libcairo2-dev libpango1.0-dev
+
+# For OpenGL support:
+
+ sudo apt-get install libglu1-mesa-dev
- sudo apt-get install libasound2-dev
- sudo apt-get install freeglut3-dev
- sudo apt-get install libcairo2-dev
- sudo apt-get install libfontconfig1-dev
- sudo apt-get install libglew-dev
- sudo apt-get install libjpeg-dev
- sudo apt-get install libpng-dev
- sudo apt-get install libpango1.0-dev
- sudo apt-get install libxinerama-dev
+# Optional packages:
-If you want to build FLTK for Wayland (the supposed successor of X) you need
-some more packages. Please refer to README.Wayland.txt for more information.
+ sudo apt-get install libasound2-dev # audio support
If you are planning to use the Code::Blocks IDE, also install this
@@ -292,35 +289,38 @@ Change the following instructions to fit your preferences.
3.2 Configuration and Building
---------------------------------
-Since FLTK 1.5 the only build system (generator) used by FLTK is CMake.
-CMake can be used to create the build system of your choice, for instance
-Makefiles, Ninja build files, Xcode, or Visual Studio IDE projects etc..
+This fork uses a simple Makefile. No CMake or autoconf required.
-Note: The "classic" build system with autoconf, configure, and Makefiles
-is no longer available.
-
-Please see README.CMake.txt for how to build FLTK and your application
-programs using CMake.
-
-You can, of course, build FLTK with CMake and your own application(s)
-with your existing and well-known build system.
+Build options are controlled via make variables:
+ - USE_CAIRO=1 (default): Cairo+Pango rendering
+ - USE_CAIRO=0: Pure Xlib+Xft rendering (no Cairo/Pango dependency)
+ - USE_BUNDLED_X11=1: Use bundled X11 headers from xlibs/include
3.3 Building FLTK in a Nutshell
----------------------------------
-Following are only basic commands, please see details in README.CMake.txt.
+Building FLTK with default parameters (Cairo+Pango):
+
+ make # Build all libraries and fluid
+ make test/hello # Build a test program
+
+Building without Cairo (pure Xlib+Xft):
-Building FLTK with all default parameters on your platform is easy.
-Stay in your FLTK source-code directory and type:
+ make USE_CAIRO=0 # Build with Xlib+Xft rendering
- cmake . -B build -D [ CMAKE_BUILD_TYPE=Debug ... more options ]
- cmake --build build
+Using bundled X11 headers (first run xlibs/fetch_headers.sh):
-The entire FLTK toolkit including many test programs will be built for you
-in the subdirectory `build`. No warnings should appear. If some do, please
-let the FLTK developer team know via the mailing list "fltk.general" or
-view the bug reporting guidelines at https://www.fltk.org/bugs.php .
+ ./xlibs/fetch_headers.sh
+ make USE_BUNDLED_X11=1
+
+The libraries are built in lib/:
+ - libfltk.a Core library
+ - libfltk_images.a Image support (PNG, JPEG, GIF, etc.)
+ - libfltk_gl.a OpenGL support
+ - libfltk_forms.a XForms compatibility
+
+The fluid GUI builder is built in bin/fluid.
3.4 Testing FLTK
@@ -335,25 +335,22 @@ After a successful build, you can test FLTK's capabilities:
3.5 Installing FLTK
----------------------
-If you did not change any of the configuration settings, FLTK will be installed
-in "/usr/local/include" and "/usr/local/lib" by typing
+FLTK can be installed to /usr/local by typing:
+
+ sudo make install
- sudo cmake --install .
+This will copy:
+ - Headers to /usr/local/include/FL
+ - Libraries to /usr/local/lib
+ - fluid to /usr/local/bin
-in your build folder. Note the trailing '.' .
+To change the installation prefix, edit PREFIX in Makefile or type:
-It is possible to install FLTK without superuser privileges by changing the
-installation path to a location within the user account by adding the
-"-D CMAKE_INSTALL_PREFIX=<path>" parameters to the "cmake" command.
+ sudo make PREFIX=/opt/fltk install
Note: installing FLTK is optional. You can build your own software by using
the FLTK build tree directly. This is recommended if you link your application
-statically (which is recommended as well). This is particularly important if you
-consider using different FLTK versions on a development system to avoid mixing
-FLTK versions when building (a well-known problem) or running FLTK applications
-with installed shared libraries of a different FLTK version. OTOH, if you build
-shared FLTK libraries you may want to install FLTK, particularly on a production
-system.
+statically (which is recommended as well).
3.6 Creating Your Own Projects