[waffle] [PATCH 03/18] README_WIN: add some notes about configuring and building WGL

Emil Velikov emil.l.velikov at gmail.com
Tue Jul 22 20:31:29 PDT 2014


TODO:
 - Fill in the missing sections.
 - Move to a better place.
 - Double-check for typos and thinkos.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 README_WIN.txt | 157 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 157 insertions(+)
 create mode 100644 README_WIN.txt

diff --git a/README_WIN.txt b/README_WIN.txt
new file mode 100644
index 0000000..3665259
--- /dev/null
+++ b/README_WIN.txt
@@ -0,0 +1,157 @@
+Build Requirements
+==================
+
+Windows
+-------
+
+Cross-building under Linux
+--------------------------
+
+Waffle uses CMake for it build system.
+
+    Archlinux: pacman -S cmake
+    Fedora 17: yum install cmake
+    Debian: apt-get install cmake
+
+The MinGW-W64 cross-build toolchain is recommended and its CMake wrapper.
+
+    Archlinux: pacman -S mingw-w64-gcc mingw-w64-cmake (latter is in AUR)
+    Fedora 17: yum install FINISHME
+    Debian: apt-get install FINISHME
+
+
+Native builds
+-------------
+
+    Waffle is heavily requires on the C99 standard. As such only reasonable
+    compiler (at the time of writing) from the Microsoft Visual Compiler
+    series is MSVC 2013. Building with older versions is likely to be broken.
+
+    Waffle is not tested to build under CYGWIN. The build is likely to be
+    broken. Patches addressing it are more than welcome.
+
+
+Installing
+==========
+
+For full details on configuring, building, and installing Waffle, see
+/doc/building.txt. What follows is a quick how-to.
+
+
+0. Be in the correct directory
+------------------------------
+
+    git clone git://github.com/waffle-gl/waffle
+    cd waffle
+
+or
+
+    tar xvf waffle-0.0.0.tar.xz
+    cd waffle-0.0.0
+
+
+1. Configure
+------------
+
+    Currently tests are known to be broken. Make sure to pass the following
+    cofigure option to avoid building them `-Dwaffle_build_tests=0`
+
+Cross-building under Linux
+--------------------------
+
+    _architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+    unset LDFLAGS
+    for _arch in ${_architectures}; do
+      _install_prefix=/usr/${_arch}
+      mkdir -p build-${_arch} && pushd build-${_arch}
+      ${_arch}-cmake .. \
+        -DCMAKE_INSTALL_PREFIX=${_install_prefix} \
+        -DCMAKE_INSTALL_LIBDIR=${_install_prefix}/lib \
+        -DCMAKE_BUILD_TYPE=Release \
+        \
+        -Dwaffle_build_tests=0 \
+        -Dwaffle_build_manpages=0 \
+        -Dwaffle_build_htmldocs=0 \
+        -Dwaffle_build_examples=1
+      make
+      popd
+    done
+
+    Make sure to adjust _install_prefix to "" if the resulting library will
+    not be used for further cross-building.
+
+
+Native builds
+-------------
+
+    @if "%VS120COMNTOOLS%"=="" exit /b 127
+    call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
+
+    cmake -G "Visual Studio 12" -H%CD% -B%CD%\build\msvc32 -DCMAKE_INSTALL_PREFIX=""
+    @if %errorlevel% neq 0 exit /b %errorlevel%
+
+    call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x64
+
+    cmake -G "Visual Studio 12" -H%CD% -B%CD%\build\msvc64 -DCMAKE_INSTALL_PREFIX=""
+    @if %errorlevel% neq 0 exit /b %errorlevel%
+
+    If building a Windows XP compatible library make sure to add
+    `-T "v120_xp"` after the generator. For example:
+        cmake -G "Visual Studio 12" -T "v120_xp" -H%CD% ...
+
+
+3. Build and Install
+--------------------
+
+
+Cross-building under Linux
+--------------------------
+
+    _architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+    unset LDFLAGS
+    for _arch in ${_architectures}; do
+      pushd build-${_arch}
+      make
+      make install
+      popd
+    done
+
+    Note: Running tests (make check and make check-func) are not tested but
+    may work if the approapriate environment is setup via wine.
+
+
+
+Native builds
+-------------
+
+    @if "%VS120COMNTOOLS%"=="" exit /b 127
+    call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
+
+    cmake --build %CD%\build\msvc32 --config Debug %*
+    @if %errorlevel% neq 0 exit /b %errorlevel%
+
+    call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x64
+
+    cmake --build %CD%\build\msvc64 --config Debug %*
+    @if %errorlevel% neq 0 exit /b %errorlevel%
+
+
+4. Package
+----------
+
+Cross-building under Linux
+--------------------------
+
+    _architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+    unset LDFLAGS
+    for _arch in ${_architectures}; do
+      pushd build-${_arch}
+      make package
+      popd
+    done
+
+
+Native builds
+-------------
+
+     WRITE ME
-- 
2.0.2



More information about the waffle mailing list