Add support for building static libs with CMake. Fix file permissions. Update documentation about building static libs and about using OpenGL ES / EGL.
CMake is now the recommended way to build epoxy. It should be as cample as:
CMake is now the recommended way to build epoxy. It should be as simple as:
cd <my-build_dir>
cmake <my-source-dir>
And then build the project, depending on the type of your toolset, e.g. for Unix
type "make", for MSVC open the solution in Visual studio and build the solution.
type "make", and for MSVC open the solution in Visual studio and build the
solution.
To rebuild the generated headers from the specs, add
* To rebuild the generated headers from the specs, add
"-DEPOXY_REBUILD_FROM_SPECS=ON" to the "cmake" invocation.
Note that building with CMake currently doesn't support testing.
* To build also static libraries, add
"-DEPOXY_BUILD_STATIC=ON" to the "cmake" invocation.
* To disable building shared libraries, add
"-DEPOXY_BUILD_SHARED=OFF" to the "cmake" invocation.
Note that building with CMake currently doesn't support building or running
tests.
Building (Autotools)
---------------------
On unix you can also use autotools to build:
On Unix you can also use autotools to build. This type of build only supports
building shared libraries. However it also supports building and running tests.
To build with autotools, write:
./autogen.sh
make
@ -51,14 +63,11 @@ On unix you can also use autotools to build:
Dependencies for debian:
* automake
* libegl1-mesa-dev
* xutils-dev
Dependencies for OS X (macports):
* automake
* autoconf
* xorg-util-macros
* pkgconfig
@ -67,17 +76,29 @@ The test suite has additional dependencies depending on the platform.
Building (NMAKE)
-----------------
With MSVC you can also build directly with NMAKE:
1) Check src\Makefile.vc to ensure that PYTHONDIR is pointing to your Python installation, either a 32-bit or a 64-bit (x64) installation of Python 2 or 3 will do.
With MSVC you can also build directly with NMAKE. This type of build only
supports building shared libraries. However it also supports building
tests.
1) Check src\Makefile.vc to ensure that PYTHONDIR is pointing to your Python
installation, either a 32-bit or a 64-bit (x64) installation of Python 2 or 3
will do.
2) Copy "include\epoxy\config.h.guess" to "include\epoxy\config.h".
3) Open an MSVC Command prompt and run "nmake Makefile.vc CFG=release" or "nmake Makefile.vc CFG=debug" in src\ for a release or debug build.
4) Optionally, add src\ into your PATH and run the previous step in test\. Run the tests by running the built .exe's.
5) Assuming you want to install in %INSTALL_DIR%, copy common.h, config.h, khrplatform.h, eglplatform.h, gl.h, gl_generated.h, wgl.h, wgl_generated.h, egl.h and egl_generated.h from include\epoxy\ to %INSTALL_DIR%\include\epoxy\, copy src\epoxy.lib to %INSTALL_DIR%\lib\ and copy epoxy-vs12.dll and epoxy-vs12.pdb (if you've built a debug build) from src\ to %INSTALL_DIR%\bin\. Create directories as needed.
3) Open an MSVC Command prompt and run "nmake Makefile.vc CFG=release" or
"nmake Makefile.vc CFG=debug" in src\ for a release or debug build.
4) Optionally, add src\ into your PATH and run the previous step in test\. Run
the tests by running the built ".exe"-s.
5) Assuming you want to install in %INSTALL_DIR%, copy common.h, config.h,