mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-01-24 17:26:41 +00:00
Add option to use system copy of GLPNG
This commit is contained in:
parent
4d1fa75545
commit
0dd19f9cb3
10 changed files with 29 additions and 11 deletions
|
@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include "../BBGE/DebugFont.h"
|
||||
#include "../ExternalLibs/glpng.h"
|
||||
#include <GL/glpng.h>
|
||||
#include "../BBGE/AfterEffect.h"
|
||||
|
||||
#include "DSQ.h"
|
||||
|
|
|
@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define GAME_H
|
||||
|
||||
#include "../BBGE/DebugFont.h"
|
||||
#include "../ExternalLibs/glpng.h"
|
||||
#include <GL/glpng.h>
|
||||
|
||||
#include "DSQ.h"
|
||||
#include "AquariaMenuItem.h"
|
||||
|
|
|
@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include "../BBGE/MathFunctions.h"
|
||||
#include "../ExternalLibs/glpng.h"
|
||||
#include <GL/glpng.h>
|
||||
#include "../BBGE/Gradient.h"
|
||||
#include "../BBGE/DebugFont.h"
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
#include "Texture.h"
|
||||
#include "Core.h"
|
||||
#include "../ExternalLibs/glpng.h"
|
||||
#include <GL/glpng.h>
|
||||
#include "ByteBuffer.h"
|
||||
#include "RenderBase.h"
|
||||
#include <assert.h>
|
||||
|
|
|
@ -252,6 +252,18 @@ else(FTGL_FOUND)
|
|||
ADD_DEFINITIONS(-DAQUARIA_INTERNAL_FTGL=1)
|
||||
endif(FTGL_FOUND)
|
||||
|
||||
### GLPNG
|
||||
|
||||
OPTION(AQUARIA_INTERNAL_GLPNG "Always use included GLPNG library" TRUE)
|
||||
if(NOT AQUARIA_INTERNAL_GLPNG)
|
||||
find_package(GLPNG)
|
||||
endif(NOT AQUARIA_INTERNAL_GLPNG)
|
||||
if(NOT GLPNG_FOUND)
|
||||
message(STATUS "Using internal copy of GLPNG")
|
||||
set(GLPNG_INCLUDE_DIRS "${EXTLIBDIR}/glpng")
|
||||
set(GLPNG_SRCS "${EXTLIBDIR}/glpng/glpng.c")
|
||||
endif(NOT GLPNG_FOUND)
|
||||
|
||||
################ End of external libraries
|
||||
|
||||
INCLUDE_DIRECTORIES(${BBGEDIR})
|
||||
|
@ -261,6 +273,7 @@ INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
|
|||
INCLUDE_DIRECTORIES(${SRCDIR})
|
||||
INCLUDE_DIRECTORIES(${FTGL_INCLUDE_DIRS})
|
||||
INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS})
|
||||
INCLUDE_DIRECTORIES(${GLPNG_INCLUDE_DIRS})
|
||||
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR})
|
||||
INCLUDE_DIRECTORIES(${OGGVORBIS_INCLUDE_DIRS})
|
||||
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
|
||||
|
@ -528,7 +541,6 @@ SET(BBGE_SRCS
|
|||
${COCOA_SRCS}
|
||||
${EXTLIBDIR}/DeflateCompressor.cpp
|
||||
${EXTLIBDIR}/glfont2/glfont2.cpp
|
||||
${EXTLIBDIR}/glpng/glpng.c
|
||||
${EXTLIBDIR}/minihttp.cpp
|
||||
${EXTLIBDIR}/JPS.h
|
||||
)
|
||||
|
@ -780,6 +792,12 @@ ELSE(FTGL_FOUND)
|
|||
SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${FTGL_SRCS})
|
||||
ENDIF(FTGL_FOUND)
|
||||
|
||||
IF(GLPNG_FOUND)
|
||||
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${GLPNG_LIBRARIES})
|
||||
ELSE(GLPNG_FOUND)
|
||||
SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${GLPNG_SRCS})
|
||||
ENDIF(GLPNG_FOUND)
|
||||
|
||||
ADD_EXECUTABLE(aquaria ${EXETYPE}
|
||||
${AQUARIA_SRCS}
|
||||
${BBGE_SRCS}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
//#define GL_GLEXT_PROTOTYPES
|
||||
|
||||
//#include <GL/glpng.h>
|
||||
#include "../glpng.h"
|
||||
#include "GL/glpng.h"
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config";"$(SolutionDir)\..\ExternalLibs\glpng\zlib";"$(SolutionDir)\..\ExternalLibs\glpng\png";"$(SolutionDir)\..\ExternalLibs\libogg\include";"$(SolutionDir)\..\ExternalLibs\libvorbis\include";"$(SolutionDir)\..\ExternalLibs\freetype2\include";"$(SolutionDir)\..\ExternalLibs\FTGL\include";"$(SolutionDir)\..\ExternalLibs\SDL2\include";"$(SolutionDir)\..\ExternalLibs\AL\include";"$(SolutionDir)\..\BBGE";"$(SolutionDir)\..\ExternalLibs\lua-5.1.4\src";"$(SolutionDir)\..\ExternalLibs\lvpa\include";"$(SolutionDir)\..\ExternalLibs\lvpa";"$(SolutionDir)\..\ExternalLibs\tinyxml2";"$(SolutionDir)\..\ExternalLibs\ttvfs";"$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi";"$(SolutionDir)\..\ExternalLibs""
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config";"$(SolutionDir)\..\ExternalLibs\glpng";"$(SolutionDir)\..\ExternalLibs\libogg\include";"$(SolutionDir)\..\ExternalLibs\libvorbis\include";"$(SolutionDir)\..\ExternalLibs\freetype2\include";"$(SolutionDir)\..\ExternalLibs\FTGL\include";"$(SolutionDir)\..\ExternalLibs\SDL2\include";"$(SolutionDir)\..\ExternalLibs\AL\include";"$(SolutionDir)\..\BBGE";"$(SolutionDir)\..\ExternalLibs\lua-5.1.4\src";"$(SolutionDir)\..\ExternalLibs\lvpa\include";"$(SolutionDir)\..\ExternalLibs\lvpa";"$(SolutionDir)\..\ExternalLibs\tinyxml2";"$(SolutionDir)\..\ExternalLibs\ttvfs";"$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi";"$(SolutionDir)\..\ExternalLibs""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;GL_GLEXT_LEGACY=1;HAVE_PUTENV=1;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;BBGE_BUILD_WINDOWS=1;BBGE_BUILD_VFS=1;VFS_ENABLE_C_API=1;BBGE_USE_GLM=1;AQUARIA_INTERNAL_FTGL=1;BBGE_BUILD_SDL2"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="0"
|
||||
|
@ -125,7 +125,7 @@
|
|||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
EnableFiberSafeOptimizations="true"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config";"$(SolutionDir)\..\ExternalLibs\glpng\zlib";"$(SolutionDir)\..\ExternalLibs\glpng\png";"$(SolutionDir)\..\ExternalLibs\libogg\include";"$(SolutionDir)\..\ExternalLibs\libvorbis\include";"$(SolutionDir)\..\ExternalLibs\freetype2\include";"$(SolutionDir)\..\ExternalLibs\FTGL\include";"$(SolutionDir)\..\ExternalLibs\SDL2\include";"$(SolutionDir)\..\ExternalLibs\AL\include";"$(SolutionDir)\..\BBGE";"$(SolutionDir)\..\ExternalLibs\lua-5.1.4\src";"$(SolutionDir)\..\ExternalLibs\lvpa\include";"$(SolutionDir)\..\ExternalLibs\lvpa";"$(SolutionDir)\..\ExternalLibs\tinyxml2";"$(SolutionDir)\..\ExternalLibs\ttvfs";"$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi";"$(SolutionDir)\..\ExternalLibs""
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config";"$(SolutionDir)\..\ExternalLibs\glpng";"$(SolutionDir)\..\ExternalLibs\libogg\include";"$(SolutionDir)\..\ExternalLibs\libvorbis\include";"$(SolutionDir)\..\ExternalLibs\freetype2\include";"$(SolutionDir)\..\ExternalLibs\FTGL\include";"$(SolutionDir)\..\ExternalLibs\SDL2\include";"$(SolutionDir)\..\ExternalLibs\AL\include";"$(SolutionDir)\..\BBGE";"$(SolutionDir)\..\ExternalLibs\lua-5.1.4\src";"$(SolutionDir)\..\ExternalLibs\lvpa\include";"$(SolutionDir)\..\ExternalLibs\lvpa";"$(SolutionDir)\..\ExternalLibs\tinyxml2";"$(SolutionDir)\..\ExternalLibs\ttvfs";"$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi";"$(SolutionDir)\..\ExternalLibs""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;GL_GLEXT_LEGACY=1;HAVE_PUTENV=1;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;BBGE_BUILD_WINDOWS=1;_HAS_EXCEPTIONS=0;BBGE_BUILD_VFS=1;VFS_ENABLE_C_API=1;BBGE_USE_GLM=1;AQUARIA_INTERNAL_FTGL=1;BBGE_BUILD_SDL2"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config";"$(SolutionDir)\..\BBGE";"$(SolutionDir)\..\ExternalLibs\zlib";"$(SolutionDir)\..\ExternalLibs\png";"$(SolutionDir)\..\ExternalLibs\libogg\include";"$(SolutionDir)\..\ExternalLibs\libvorbis\include";"$(SolutionDir)\..\ExternalLibs\freetype2\include";"$(SolutionDir)\..\ExternalLibs\FTGL\include";"$(SolutionDir)\..\ExternalLibs\SDL2\include";"$(SolutionDir)\..\ExternalLibs\AL\include";"$(SolutionDir)\..\ExternalLibs\tinyxml2";"$(SolutionDir)\..\ExternalLibs\ttvfs";"$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi";"$(SolutionDir)\..\ExternalLibs\lvpa";"$(SolutionDir)\..\ExternalLibs\lvpa\include";"$(SolutionDir)\..\ExternalLibs""
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config";"$(SolutionDir)\..\ExternalLibs\glpng";"$(SolutionDir)\..\BBGE";"$(SolutionDir)\..\ExternalLibs\zlib";"$(SolutionDir)\..\ExternalLibs\png";"$(SolutionDir)\..\ExternalLibs\libogg\include";"$(SolutionDir)\..\ExternalLibs\libvorbis\include";"$(SolutionDir)\..\ExternalLibs\freetype2\include";"$(SolutionDir)\..\ExternalLibs\FTGL\include";"$(SolutionDir)\..\ExternalLibs\SDL2\include";"$(SolutionDir)\..\ExternalLibs\AL\include";"$(SolutionDir)\..\ExternalLibs\tinyxml2";"$(SolutionDir)\..\ExternalLibs\ttvfs";"$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi";"$(SolutionDir)\..\ExternalLibs\lvpa";"$(SolutionDir)\..\ExternalLibs\lvpa\include";"$(SolutionDir)\..\ExternalLibs""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;GL_GLEXT_LEGACY=1;HAVE_PUTENV=1;FTGL_LIBRARY_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;BBGE_BUILD_WINDOWS=1;VFS_ENABLE_C_API=1;BBGE_USE_GLM=1;AQUARIA_INTERNAL_FTGL=1;BBGE_BUILD_SDL2"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="0"
|
||||
|
@ -116,7 +116,7 @@
|
|||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
EnableFiberSafeOptimizations="true"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config";"$(SolutionDir)\..\BBGE";"$(SolutionDir)\..\ExternalLibs\zlib";"$(SolutionDir)\..\ExternalLibs\png";"$(SolutionDir)\..\ExternalLibs\libogg\include";"$(SolutionDir)\..\ExternalLibs\libvorbis\include";"$(SolutionDir)\..\ExternalLibs\freetype2\include";"$(SolutionDir)\..\ExternalLibs\FTGL\include";"$(SolutionDir)\..\ExternalLibs\SDL2\include";"$(SolutionDir)\..\ExternalLibs\AL\include";"$(SolutionDir)\..\ExternalLibs\tinyxml2";"$(SolutionDir)\..\ExternalLibs\ttvfs";"$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi";"$(SolutionDir)\..\ExternalLibs\lvpa";"$(SolutionDir)\..\ExternalLibs\lvpa\include";"$(SolutionDir)\..\ExternalLibs""
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\..\ExternalLibs\freetype2\include\freetype\config";"$(SolutionDir)\..\ExternalLibs\glpng";"$(SolutionDir)\..\BBGE";"$(SolutionDir)\..\ExternalLibs\zlib";"$(SolutionDir)\..\ExternalLibs\png";"$(SolutionDir)\..\ExternalLibs\libogg\include";"$(SolutionDir)\..\ExternalLibs\libvorbis\include";"$(SolutionDir)\..\ExternalLibs\freetype2\include";"$(SolutionDir)\..\ExternalLibs\FTGL\include";"$(SolutionDir)\..\ExternalLibs\SDL2\include";"$(SolutionDir)\..\ExternalLibs\AL\include";"$(SolutionDir)\..\ExternalLibs\tinyxml2";"$(SolutionDir)\..\ExternalLibs\ttvfs";"$(SolutionDir)\..\ExternalLibs\ttvfs_cfileapi";"$(SolutionDir)\..\ExternalLibs\lvpa";"$(SolutionDir)\..\ExternalLibs\lvpa\include";"$(SolutionDir)\..\ExternalLibs""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GL_GLEXT_LEGACY=1;HAVE_PUTENV=1;FTGL_LIBRARY_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;BBGE_BUILD_WINDOWS=1;_HAS_EXCEPTIONS=0;VFS_ENABLE_C_API=1;BBGE_USE_GLM=1;AQUARIA_INTERNAL_FTGL=1;BBGE_BUILD_SDL2"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\ExternalLibs\glpng.h"
|
||||
RelativePath="..\..\ExternalLibs\glpng\GL\glpng.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
|
|
Loading…
Reference in a new issue