Remove our GLU dependency. Fix static zlib

This commit is contained in:
Ryan Houdek 2013-12-23 16:01:34 -07:00
parent 86b3719d14
commit a87e0e7489
3 changed files with 18 additions and 20 deletions

View File

@ -353,9 +353,7 @@ if(NOT ANDROID)
if(NOT USE_GLES3)
include(FindOpenGL)
include_directories(${OPENGL_INCLUDE_DIR})
if(NOT OPENGL_GLU_FOUND)
message(FATAL_ERROR "GLU is required but not found")
endif()
add_definitions(-DGLEW_NO_GLU)
else()
set(X11_FOUND 1)
endif()
@ -519,6 +517,21 @@ include_directories(Source/Core/VideoUICommon/Src)
add_subdirectory(Externals/Bochs_disasm)
include_directories(Externals/Bochs_disasm)
# If zlib has already been found on a previous run of cmake don't check again
# as the check seems to take a long time.
if(NOT ZLIB_FOUND)
include(FindZLIB OPTIONAL)
endif()
if(ZLIB_FOUND)
set(ZLIB_FOUND 1 CACHE INTERNAL "")
message("Using shared zlib")
include_directories(${ZLIB_INCLUDE_DIRS})
else(ZLIB_FOUND)
message("Shared zlib not found, falling back to the static library")
add_subdirectory(Externals/zlib)
include_directories(Externals/zlib)
endif(ZLIB_FOUND)
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT ANDROID)
check_lib(LZO lzo2 lzo/lzo1x.h QUIET)
endif()
@ -640,21 +653,6 @@ else()
include_directories(Externals/SOIL)
endif()
# If zlib has already been found on a previous run of cmake don't check again
# as the check seems to take a long time.
if(NOT ZLIB_FOUND)
include(FindZLIB OPTIONAL)
endif()
if(ZLIB_FOUND)
set(ZLIB_FOUND 1 CACHE INTERNAL "")
message("Using shared zlib")
include_directories(${ZLIB_INCLUDE_DIRS})
else(ZLIB_FOUND)
message("Shared zlib not found, falling back to the static library")
add_subdirectory(Externals/zlib)
include_directories(Externals/zlib)
endif(ZLIB_FOUND)
if(WIN32)
find_library(GLEW glew32s PATHS Externals/GLew)
include_directories(Externals/GLew/include)

View File

@ -76,4 +76,4 @@ set(ZLIB_SRCS
zutil.c
)
add_library(libz STATIC ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
add_library(z STATIC ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})

View File

@ -69,7 +69,7 @@ bool SaveTexture(const std::string filename, u32 textarget, u32 tex, int virtual
const GLenum err = GL_REPORT_ERROR();
if (GL_NO_ERROR != err)
{
PanicAlert("Can't save texture, GL Error: %s", gluErrorString(err));
PanicAlert("Can't save texture, GL Error: %d", err);
delete[] data;
return false;
}