link_GLEW.xcpjh


//////////////////// GLEW //////////////////////
/*
The OpenGL Extension Wrangler Library (GLEW) is a cross-platform C/C++ library that helps in 
querying and loading OpenGL extensions. GLEW provides efficient run-time mechanisms for determining
which OpenGL extensions are supported on the target platform. All OpenGL extensions are exposed in 
a single header file, which is machine-generated from the official extension list. GLEW is 
available for a variety of operating systems, including Windows, Linux, Mac OS X, FreeBSD, IRIX, 
and Solaris.

GLEW is distributed under modified BSD licenses, and the header file generator is under the GNU GPL.
*/

@if (IsWindowsPlatform)
{    
    $GLEW = "$(PATH_TO_ROOT)/ThirdParty.Ceda/GLEW/Windows/glew-1.10.0"

    +cpp
    {
        // Enable static linking
        /D "GLEW_STATIC"

        /I "$(GLEW)/include"
    }
    +link("Win32")
    {
        // DLL.  Must not #define GLEW_STATIC
        //"$(GLEW)/lib/Release/Win32/glew32.lib"

        // Static library.  Must #define GLEW_STATIC
        "$(GLEW)/lib/Release/Win32/glew32s.lib"

        //"$(GLEW)/lib/Release MX/Win32/glew32mx.lib"
        //"$(GLEW)/lib/Release MX/Win32/glew32mxs.lib"
    }
    +link("x64")
    {
        // DLL.  Must not #define GLEW_STATIC
        //"$(GLEW)/lib/Release/x64/glew32.lib"

        // Static library.  Must #define GLEW_STATIC
        "$(GLEW)/lib/Release/x64/glew32s.lib"

        //"$(GLEW)/lib/Release MX/x64/glew32mx.lib"
        //"$(GLEW)/lib/Release MX/x64/glew32mxs.lib"
    }
}
@if (IsMacOSXPlatform)
{
    // requires brew install glew
    +cpp
    {
        `pkg-config --cflags glew`
    }
}