cmake for epoxy and rip glew

This commit is contained in:
Jeff Hutchinson 2016-03-25 13:38:40 -04:00
parent 7b35ce3212
commit b89d2a116e
2 changed files with 45 additions and 12 deletions

View file

@ -0,0 +1,39 @@
# -----------------------------------------------------------------------------
# Copyright (c) 2016 GarageGames, LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# -----------------------------------------------------------------------------
project(epoxy)
addPath("${libDir}/epoxy/src")
# TODO EGL support if we ever use EGL instead of GLX
if (WIN32)
addPath("${libDir}/epoxy/src/wgl")
addDef(BUILD_WGL)
else()
addPath("${libDir}/epoxy/src/glx")
addDef(BUILD_GLX)
endif()
addInclude("${libDir}/epoxy/include")
addInclude("${libDir}/epoxy/src")
finishLibrary()

View file

@ -473,12 +473,9 @@ if( TORQUE_OPENGL )
if( TORQUE_OPENGL AND NOT TORQUE_DEDICATED )
addPath("${srcDir}/gfx/gl")
addPath("${srcDir}/gfx/gl/tGL")
addPath("${srcDir}/shaderGen/GLSL")
addPath("${srcDir}/shaderGen/GLSL")
addPath("${srcDir}/terrain/glsl")
addPath("${srcDir}/forest/glsl")
# glew
LIST(APPEND ${PROJECT_NAME}_files "${libDir}/glew/src/glew.c")
endif()
if(WIN32 AND NOT TORQUE_SDL)
@ -531,6 +528,9 @@ addLib(squish)
addLib(collada)
addLib(pcre)
addLib(convexDecomp)
if (TORQUE_OPENGL)
addLib(epoxy)
endif()
if(WIN32)
# copy pasted from T3D build system, some might not be needed
@ -590,9 +590,6 @@ endif()
if(TORQUE_OPENGL)
addDef(TORQUE_OPENGL)
if(WIN32)
addDef(GLEW_STATIC)
endif()
endif()
if(TORQUE_SDL)
@ -624,7 +621,8 @@ addInclude("${libDir}/opcode")
addInclude("${libDir}/collada/include")
addInclude("${libDir}/collada/include/1.4")
if(TORQUE_OPENGL)
addInclude("${libDir}/glew/include")
addInclude("${libDir}/epoxy/include")
addInclude("${libDir}/epoxy/src")
endif()
if(UNIX)
@ -632,10 +630,6 @@ if(UNIX)
addInclude("/usr/include/freetype2")
endif()
if(TORQUE_OPENGL)
addInclude("${libDir}/glew/include")
endif()
# external things
if(WIN32)
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY INCLUDE_DIRECTORIES $ENV{DXSDK_DIR}/Include)