mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-18 20:39:27 +00:00
Rework & cleanup CMake project files
- Building with CMake for development is now actually sane - Split deps into projects and extra files - Building against external deps should still work but needs testing - Can now build out of the box without further adjustments as long as SDL(2) is found properly - Build Lua in C++ mode (so it can use exceptions instead of setjmp/longjmp) - Unfortunately we need to enable exceptions for this :( - Remove these defines: * AQUARIA_BUILD_SCENEEDITOR (now always on) * AQUARIA_BUILD_CONSOLE (now always on) * BBGE_BUILD_ACHIEVEMENTS_INTERNAL (now always on unless BBGE_BUILD_STEAMWORKS is defined) * BBGE_BUILD_OPENGL_DYNAMIC (now always on, define BBGE_BUILD_OPENGL_STATIC if needed) * BBGE_BUILD_FMOD_OPENAL_BRIDGE (now always on) - BBGE_BUILD_STEAMWORKS is not actually implemented (any volunteers?) - Prepare later removal of SDL & the old vc90 project from the repo. See #74 for extra notes.
This commit is contained in:
parent
f0f9f1a719
commit
49b9e0f05a
52 changed files with 719 additions and 1053 deletions
69
ExternalLibs/CMakeLists.txt
Normal file
69
ExternalLibs/CMakeLists.txt
Normal file
|
@ -0,0 +1,69 @@
|
|||
include(tinyxml2.cmake)
|
||||
include(FTGL.cmake)
|
||||
include(oggvorbis.cmake)
|
||||
include(lua51.cmake)
|
||||
|
||||
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/AL)
|
||||
set(xdeps)
|
||||
|
||||
if(AQUARIA_USE_VFS)
|
||||
add_subdirectory(ttvfs)
|
||||
add_subdirectory(ttvfs_zip)
|
||||
add_subdirectory(ttvfs_cfileapi)
|
||||
set(xdeps ${xdeps} ttvfs ttvfs_zip ttvfs_cfileapi)
|
||||
endif()
|
||||
|
||||
set(xsrc
|
||||
algorithmx.h
|
||||
ByteBuffer.h
|
||||
DeflateCompressor.cpp
|
||||
DeflateCompressor.h
|
||||
jps.hh
|
||||
luaalloc.cpp
|
||||
luaalloc.h
|
||||
minihttp.cpp
|
||||
minihttp.h
|
||||
minipstdint.h
|
||||
miniz.cpp
|
||||
miniz.h
|
||||
stb_image.h
|
||||
stb_image_resize.h
|
||||
stb_image_write.h
|
||||
tinylibs.cpp
|
||||
# Modified version, can't use external lib
|
||||
glfont2/glfont2.cpp
|
||||
glfont2/glfont2.h
|
||||
)
|
||||
|
||||
if(AQUARIA_USE_SDL2 AND SDL2_FOUND)
|
||||
OPTION(AQUARIA_USE_MOJOAL "Use mojoAL instead of OpenAL (requires SDL2)" TRUE)
|
||||
endif()
|
||||
|
||||
if(AQUARIA_USE_MOJOAL)
|
||||
set(xsrc ${xsrc} mojoal.c)
|
||||
set(OPENAL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/AL" CACHE PATH "OpenAL include directory" FORCE)
|
||||
else()
|
||||
find_package(OpenAL REQUIRED)
|
||||
SET(xdeps ${xdeps} ${OPENAL_LIBRARY})
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
IF(WIN32)
|
||||
SET(xdeps ${xdeps} "ws2_32")
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(HAIKU)
|
||||
SET(xdeps ${xdeps} "network")
|
||||
ENDIF()
|
||||
|
||||
IF(APPLE)
|
||||
SET(xdeps ${xdeps} "-framework Carbon")
|
||||
SET(xdeps ${xdeps} "-framework Cocoa")
|
||||
#SET(xdeps ${xdeps} "-framework OpenAL")
|
||||
ENDIF()
|
||||
|
||||
add_library(ExternalLibs ${xsrc})
|
||||
target_link_libraries(ExternalLibs FTGL libogg tinyxml2 libvorbis ${SDL_LIBRARY} ${xdeps})
|
11
ExternalLibs/FTGL.cmake
Normal file
11
ExternalLibs/FTGL.cmake
Normal file
|
@ -0,0 +1,11 @@
|
|||
OPTION(AQUARIA_INTERNAL_FTGL "Always use included FTGL library" TRUE)
|
||||
if(AQUARIA_INTERNAL_FTGL)
|
||||
message(STATUS "Using internal copy of FTGL")
|
||||
SET(FTGLDIR ${CMAKE_CURRENT_SOURCE_DIR}/FTGL)
|
||||
set(FTGL_INCLUDE_DIRS "${FTGLDIR}/include;${FREETYPE_INCLUDE_DIRS}" CACHE INTERNAL "")
|
||||
include(freetype2.cmake) # Nothing else uses freetype2 directly
|
||||
INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS})
|
||||
add_subdirectory(FTGL)
|
||||
else()
|
||||
find_package(FTGL REQUIRED)
|
||||
endif()
|
63
ExternalLibs/FTGL/CMakeLists.txt
Normal file
63
ExternalLibs/FTGL/CMakeLists.txt
Normal file
|
@ -0,0 +1,63 @@
|
|||
# For building Aquaria
|
||||
|
||||
include_directories(include)
|
||||
|
||||
set(FTGL_SRCS
|
||||
include/FTBBox.h
|
||||
include/FTBitmapGlyph.h
|
||||
include/FTCharmap.h
|
||||
include/FTCharToGlyphIndexMap.h
|
||||
include/FTContour.h
|
||||
include/FTExtrdGlyph.h
|
||||
include/FTFace.h
|
||||
include/FTFont.h
|
||||
include/FTGL.h
|
||||
include/FTGLBitmapFont.h
|
||||
include/FTGLExtrdFont.h
|
||||
include/FTGLOutlineFont.h
|
||||
include/FTGLPixmapFont.h
|
||||
include/FTGLPolygonFont.h
|
||||
include/FTGLTextureFont.h
|
||||
include/FTGlyph.h
|
||||
include/FTGlyphContainer.h
|
||||
include/FTLibrary.h
|
||||
include/FTList.h
|
||||
include/FTOutlineGlyph.h
|
||||
include/FTPixmapGlyph.h
|
||||
include/FTPoint.h
|
||||
include/FTPolyGlyph.h
|
||||
include/FTSize.h
|
||||
include/FTTextureGlyph.h
|
||||
include/FTVector.h
|
||||
# include/FTVectoriser.h
|
||||
src/FTBitmapGlyph.cpp
|
||||
src/FTCharmap.cpp
|
||||
src/FTContour.cpp
|
||||
src/FTExtrdGlyph.cpp
|
||||
src/FTFace.cpp
|
||||
src/FTFont.cpp
|
||||
src/FTGLBitmapFont.cpp
|
||||
src/FTGLExtrdFont.cpp
|
||||
src/FTGLOutlineFont.cpp
|
||||
src/FTGLPixmapFont.cpp
|
||||
src/FTGLPolygonFont.cpp
|
||||
src/FTGLTextureFont.cpp
|
||||
src/FTGlyph.cpp
|
||||
src/FTGlyphContainer.cpp
|
||||
src/FTLibrary.cpp
|
||||
src/FTOutlineGlyph.cpp
|
||||
src/FTPixmapGlyph.cpp
|
||||
src/FTPoint.cpp
|
||||
src/FTPolyGlyph.cpp
|
||||
src/FTSize.cpp
|
||||
src/FTTextureGlyph.cpp
|
||||
# src/FTVectoriser.cpp
|
||||
)
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
${FTGL_SRCS}
|
||||
PROPERTIES COMPILE_FLAGS "-DFTGL_LIBRARY_STATIC"
|
||||
)
|
||||
|
||||
add_library(FTGL ${FTGL_SRCS})
|
||||
target_link_libraries(FTGL freetype)
|
Binary file not shown.
Binary file not shown.
79
ExternalLibs/freetype2.cmake
Normal file
79
ExternalLibs/freetype2.cmake
Normal file
|
@ -0,0 +1,79 @@
|
|||
# For building freetype2 in Aquaria
|
||||
# Using a separate cmakefile for this since FT2 comes with its own CMakeLists.txt
|
||||
# that we'd rather leave alone
|
||||
|
||||
OPTION(AQUARIA_INTERNAL_FREETYPE "Always use included FreeType library" TRUE)
|
||||
if(AQUARIA_INTERNAL_FREETYPE)
|
||||
message(STATUS "Using internal copy of freetype2")
|
||||
SET(FREETYPE2DIR ${CMAKE_CURRENT_SOURCE_DIR}/freetype2)
|
||||
SET(FREETYPE2SRCDIR ${FREETYPE2DIR}/src)
|
||||
set(FREETYPE_INCLUDE_DIRS "${FREETYPE2DIR}/include" CACHE INTERNAL "")
|
||||
SET(FREETYPE2_SRCS
|
||||
${FREETYPE2SRCDIR}/base/ftsystem.c
|
||||
${FREETYPE2SRCDIR}/base/ftdebug.c
|
||||
${FREETYPE2SRCDIR}/base/ftinit.c
|
||||
${FREETYPE2SRCDIR}/base/ftbase.c
|
||||
${FREETYPE2SRCDIR}/base/ftbbox.c
|
||||
${FREETYPE2SRCDIR}/base/ftbdf.c
|
||||
${FREETYPE2SRCDIR}/base/ftbitmap.c
|
||||
${FREETYPE2SRCDIR}/base/ftcid.c
|
||||
${FREETYPE2SRCDIR}/base/ftfstype.c
|
||||
${FREETYPE2SRCDIR}/base/ftgasp.c
|
||||
${FREETYPE2SRCDIR}/base/ftglyph.c
|
||||
${FREETYPE2SRCDIR}/base/ftgxval.c
|
||||
${FREETYPE2SRCDIR}/base/ftlcdfil.c
|
||||
${FREETYPE2SRCDIR}/base/ftmm.c
|
||||
${FREETYPE2SRCDIR}/base/ftotval.c
|
||||
${FREETYPE2SRCDIR}/base/ftpatent.c
|
||||
${FREETYPE2SRCDIR}/base/ftpfr.c
|
||||
${FREETYPE2SRCDIR}/base/ftstroke.c
|
||||
${FREETYPE2SRCDIR}/base/ftsynth.c
|
||||
${FREETYPE2SRCDIR}/base/fttype1.c
|
||||
${FREETYPE2SRCDIR}/base/ftwinfnt.c
|
||||
${FREETYPE2SRCDIR}/truetype/truetype.c
|
||||
${FREETYPE2SRCDIR}/type1/type1.c
|
||||
${FREETYPE2SRCDIR}/cff/cff.c
|
||||
${FREETYPE2SRCDIR}/cid/type1cid.c
|
||||
${FREETYPE2SRCDIR}/pfr/pfr.c
|
||||
${FREETYPE2SRCDIR}/type42/type42.c
|
||||
${FREETYPE2SRCDIR}/winfonts/winfnt.c
|
||||
${FREETYPE2SRCDIR}/pcf/pcf.c
|
||||
${FREETYPE2SRCDIR}/bdf/bdf.c
|
||||
${FREETYPE2SRCDIR}/sfnt/sfnt.c
|
||||
${FREETYPE2SRCDIR}/autofit/autofit.c
|
||||
${FREETYPE2SRCDIR}/pshinter/pshinter.c
|
||||
${FREETYPE2SRCDIR}/raster/raster.c
|
||||
${FREETYPE2SRCDIR}/smooth/smooth.c
|
||||
${FREETYPE2SRCDIR}/cache/ftcache.c
|
||||
${FREETYPE2SRCDIR}/gzip/ftgzip.c
|
||||
${FREETYPE2SRCDIR}/lzw/ftlzw.c
|
||||
${FREETYPE2SRCDIR}/psaux/psaux.c
|
||||
${FREETYPE2SRCDIR}/psnames/psmodule.c
|
||||
)
|
||||
|
||||
IF(MSVC)
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
${FREETYPE2_SRCS}
|
||||
PROPERTIES COMPILE_FLAGS "-DFT_CONFIG_OPTION_SYSTEM_ZLIB -DFT2_BUILD_LIBRARY -I${FREETYPE2SRCDIR} -I${FREETYPE2DIR}/include/freetype/config -DHAVE_FCNTL_H"
|
||||
)
|
||||
ELSE(MSVC)
|
||||
# FT2 seems to not be strict-aliasing safe, so disable that in GCC.
|
||||
CHECK_C_COMPILER_FLAG("-fno-strict-aliasing" COMPILER_HAS_NOSTRICTALIAS)
|
||||
IF(COMPILER_HAS_NOSTRICTALIAS)
|
||||
SET(NOSTRICTALIAS "-fno-strict-aliasing")
|
||||
ELSE(COMPILER_HAS_NOSTRICTALIAS)
|
||||
SET(NOSTRICTALIAS "")
|
||||
ENDIF(COMPILER_HAS_NOSTRICTALIAS)
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
${FREETYPE2_SRCS}
|
||||
PROPERTIES COMPILE_FLAGS "-Wno-extended-offsetof -DFT_CONFIG_OPTION_SYSTEM_ZLIB -DFT_CONFIG_CONFIG_H='\"${FREETYPE2DIR}/include/freetype/config/ftconfig.h\"' -DFT2_BUILD_LIBRARY -DFT_CONFIG_MODULES_H='\"${FREETYPE2DIR}/include/freetype/config/ftmodule.h\"' -I${FREETYPE2SRCDIR} -I${FREETYPE2DIR}/include/freetype/config -DHAVE_FCNTL_H ${NOSTRICTALIAS}"
|
||||
)
|
||||
ENDIF(MSVC)
|
||||
|
||||
add_library(freetype ${FREETYPE2_SRCS})
|
||||
|
||||
else()
|
||||
|
||||
find_package(Freetype REQUIRED)
|
||||
|
||||
endif()
|
|
@ -53,7 +53,7 @@ bool GLFont::Create (const char *file_name, int tex, bool loadTexture)
|
|||
//Destroy the old font if there was one, just to be safe
|
||||
Destroy();
|
||||
|
||||
|
||||
|
||||
VFILE *fh = vfopen(file_name, "rb");
|
||||
if (!fh)
|
||||
return false;
|
||||
|
@ -105,7 +105,7 @@ bool GLFont::Create (const char *file_name, int tex, bool loadTexture)
|
|||
|
||||
if (loadTexture)
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
|
@ -119,7 +119,7 @@ bool GLFont::Create (const char *file_name, int tex, bool loadTexture)
|
|||
//Build2DMipmaps(3, header.tex_width, header.tex_height, GL_LUMINANCE_ALPHA, tex_bytes, 1);
|
||||
//Create OpenGL texture
|
||||
/*
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
|
@ -218,7 +218,7 @@ int GLFont::GetCharWidth (unsigned char c)
|
|||
else
|
||||
{
|
||||
GLFontChar *glfont_char;
|
||||
|
||||
|
||||
//Retrieve character width
|
||||
glfont_char = &header.chars[c - header.start_char];
|
||||
|
||||
|
@ -261,7 +261,7 @@ void GLFont::GetStringSize (const std::string &text, std::pair<int, int> *size)
|
|||
unsigned int c;
|
||||
GLFontChar *glfont_char;
|
||||
float width;
|
||||
|
||||
|
||||
//debugLog("size->second");
|
||||
//Height is the same for now...might change in future
|
||||
size->second = (int)(header.chars[header.start_char].dy *
|
||||
|
@ -273,7 +273,7 @@ void GLFont::GetStringSize (const std::string &text, std::pair<int, int> *size)
|
|||
{
|
||||
//Make sure character is in range
|
||||
c = (unsigned char)text[i];
|
||||
|
||||
|
||||
if (c < header.start_char || c > header.end_char)
|
||||
continue;
|
||||
|
||||
|
@ -281,13 +281,13 @@ void GLFont::GetStringSize (const std::string &text, std::pair<int, int> *size)
|
|||
glfont_char = &header.chars[c - header.start_char];
|
||||
|
||||
//Get width and height
|
||||
width += glfont_char->dx * header.tex_width;
|
||||
width += glfont_char->dx * header.tex_width;
|
||||
}
|
||||
|
||||
//Save width
|
||||
//debugLog("size first");
|
||||
size->first = (int)width;
|
||||
|
||||
|
||||
//debugLog("done");
|
||||
}
|
||||
|
||||
|
|
64
ExternalLibs/lua-5.1.4/CMakeLists.txt
Normal file
64
ExternalLibs/lua-5.1.4/CMakeLists.txt
Normal file
|
@ -0,0 +1,64 @@
|
|||
# For building in Aquaria
|
||||
|
||||
set(lua51_src
|
||||
src/lapi.c
|
||||
src/lapi.h
|
||||
src/lauxlib.c
|
||||
src/lauxlib.h
|
||||
src/lbaselib.c
|
||||
src/lcode.c
|
||||
src/lcode.h
|
||||
src/ldblib.c
|
||||
src/ldebug.c
|
||||
src/ldebug.h
|
||||
src/ldo.c
|
||||
src/ldo.h
|
||||
src/ldump.c
|
||||
src/lfunc.c
|
||||
src/lfunc.h
|
||||
src/lgc.c
|
||||
src/lgc.h
|
||||
src/linit.c
|
||||
src/liolib.c
|
||||
src/llex.c
|
||||
src/llex.h
|
||||
src/llimits.h
|
||||
src/lmathlib.c
|
||||
src/lmem.c
|
||||
src/lmem.h
|
||||
src/loadlib.c
|
||||
src/lobject.c
|
||||
src/lobject.h
|
||||
src/lopcodes.c
|
||||
src/lopcodes.h
|
||||
src/loslib.c
|
||||
src/lparser.c
|
||||
src/lparser.h
|
||||
src/lstate.c
|
||||
src/lstate.h
|
||||
src/lstring.c
|
||||
src/lstring.h
|
||||
src/lstrlib.c
|
||||
src/ltable.c
|
||||
src/ltable.h
|
||||
src/ltablib.c
|
||||
src/ltm.c
|
||||
src/ltm.h
|
||||
# src/lua.c
|
||||
src/lua.h
|
||||
# src/luac.c
|
||||
src/luaconf.h
|
||||
src/lualib.h
|
||||
src/lundump.c
|
||||
src/lundump.h
|
||||
src/lvm.c
|
||||
src/lvm.h
|
||||
src/lzio.c
|
||||
src/lzio.h
|
||||
src/print.c
|
||||
)
|
||||
|
||||
# Use C++ exceptions instead of setjmp() & longjmp()
|
||||
set_source_files_properties(${lua51_src} PROPERTIES LANGUAGE CXX)
|
||||
|
||||
add_library(lua51 ${lua51_src})
|
8
ExternalLibs/lua51.cmake
Normal file
8
ExternalLibs/lua51.cmake
Normal file
|
@ -0,0 +1,8 @@
|
|||
OPTION(AQUARIA_INTERNAL_LUA "Always use included Lua library" TRUE)
|
||||
if(AQUARIA_INTERNAL_LUA)
|
||||
message(STATUS "Using internal copy of Lua 5.1")
|
||||
set(LUA_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lua-5.1.4/src" CACHE INTERNAL "")
|
||||
add_subdirectory(lua-5.1.4)
|
||||
else()
|
||||
find_package(Lua51 REQUIRED)
|
||||
endif()
|
88
ExternalLibs/oggvorbis.cmake
Normal file
88
ExternalLibs/oggvorbis.cmake
Normal file
|
@ -0,0 +1,88 @@
|
|||
OPTION(AQUARIA_INTERNAL_OGGVORBIS "Always use included Ogg/Vorbis libraries" TRUE)
|
||||
if(AQUARIA_INTERNAL_OGGVORBIS)
|
||||
message(STATUS "Using internal copy of ogg/vorbis")
|
||||
SET(LIBOGGDIR ${CMAKE_CURRENT_SOURCE_DIR}/libogg)
|
||||
SET(LIBVORBISDIR ${CMAKE_CURRENT_SOURCE_DIR}/libvorbis)
|
||||
set(OGGVORBIS_INCLUDE_DIRS "${LIBOGGDIR}/include;${LIBVORBISDIR}/include" CACHE INTERNAL "")
|
||||
include_directories(${OGGVORBIS_INCLUDE_DIRS})
|
||||
|
||||
add_library(libogg
|
||||
${LIBOGGDIR}/src/bitwise.c
|
||||
${LIBOGGDIR}/src/framing.c
|
||||
)
|
||||
add_library(libvorbis
|
||||
${LIBVORBISDIR}/lib/analysis.c
|
||||
${LIBVORBISDIR}/lib/bitrate.c
|
||||
${LIBVORBISDIR}/lib/block.c
|
||||
${LIBVORBISDIR}/lib/codebook.c
|
||||
${LIBVORBISDIR}/lib/envelope.c
|
||||
${LIBVORBISDIR}/lib/floor0.c
|
||||
${LIBVORBISDIR}/lib/floor1.c
|
||||
${LIBVORBISDIR}/lib/info.c
|
||||
${LIBVORBISDIR}/lib/lpc.c
|
||||
${LIBVORBISDIR}/lib/lsp.c
|
||||
${LIBVORBISDIR}/lib/mapping0.c
|
||||
${LIBVORBISDIR}/lib/mdct.c
|
||||
${LIBVORBISDIR}/lib/psy.c
|
||||
${LIBVORBISDIR}/lib/registry.c
|
||||
${LIBVORBISDIR}/lib/res0.c
|
||||
${LIBVORBISDIR}/lib/sharedbook.c
|
||||
${LIBVORBISDIR}/lib/smallft.c
|
||||
${LIBVORBISDIR}/lib/synthesis.c
|
||||
${LIBVORBISDIR}/lib/vorbisfile.c
|
||||
${LIBVORBISDIR}/lib/window.c
|
||||
)
|
||||
else()
|
||||
# CMake doesn't seem to have a module for libogg or libvorbis yet, so
|
||||
# we roll our own based on existing find_package modules.
|
||||
|
||||
find_path(OGG_INCLUDE_DIR ogg.h
|
||||
HINTS $ENV{OGG_DIR}
|
||||
PATH_SUFFIXES include/ogg include
|
||||
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
|
||||
)
|
||||
find_library(OGG_LIBRARY
|
||||
NAMES ogg
|
||||
HINTS $ENV{OGG_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
|
||||
)
|
||||
|
||||
if(OGG_LIBRARY)
|
||||
|
||||
find_path(VORBIS_INCLUDE_DIR vorbisfile.h
|
||||
HINTS $ENV{VORBIS_DIR}
|
||||
PATH_SUFFIXES include/vorbis include
|
||||
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
|
||||
)
|
||||
find_library(VORBIS_LIBRARY
|
||||
NAMES vorbis
|
||||
HINTS $ENV{VORBIS_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
|
||||
)
|
||||
find_library(VORBISFILE_LIBRARY
|
||||
NAMES vorbisfile
|
||||
HINTS $ENV{VORBIS_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
|
||||
)
|
||||
|
||||
if(VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
|
||||
set(OGGVORBIS_INCLUDE_DIRS "${OGG_INCLUDE_DIR};${VORBIS_INCLUDE_DIR}" CACHE STRING "Ogg/Vorbis include directories")
|
||||
if(UNIX AND NOT APPLE)
|
||||
find_library(VORBIS_MATH_LIBRARY m)
|
||||
set(OGGVORBIS_LIBRARIES "${VORBISFILE_LIBRARY};${VORBIS_LIBRARY};${VORBIS_MATH_LIBRARY};${OGG_LIBRARY}" CACHE STRING "Ogg/Vorbis libraries")
|
||||
else(UNIX AND NOT APPLE)
|
||||
set(OGGVORBIS_LIBRARIES "${VORBISFILE_LIBRARY};${VORBIS_LIBRARY};${OGG_LIBRARY}" CACHE STRING "Ogg/Vorbis libraries")
|
||||
endif(UNIX AND NOT APPLE)
|
||||
endif(VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
|
||||
|
||||
endif(OGG_LIBRARY)
|
||||
|
||||
find_package_handle_standard_args(OggVorbis DEFAULT_MSG OGGVORBIS_LIBRARIES OGGVORBIS_INCLUDE_DIRS)
|
||||
|
||||
mark_as_advanced(OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR OGGVORBIS_INCLUDE_DIRS)
|
||||
mark_as_advanced(OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBIS_MATH_LIBRARY OGGVORBIS_LIBRARIES)
|
||||
|
||||
endif()
|
8
ExternalLibs/tinyxml2.cmake
Normal file
8
ExternalLibs/tinyxml2.cmake
Normal file
|
@ -0,0 +1,8 @@
|
|||
OPTION(AQUARIA_INTERNAL_TINYXML2 "Always use included TinyXML2 library" TRUE)
|
||||
if(AQUARIA_INTERNAL_TINYXML2)
|
||||
message(STATUS "Using internal copy of TinyXML2")
|
||||
set(TINYXML2_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tinyxml2" CACHE INTERNAL "")
|
||||
add_library(tinyxml2 tinyxml2/tinyxml2.cpp tinyxml2/tinyxml2.h)
|
||||
else()
|
||||
find_package(TinyXML2 REQUIRED)
|
||||
endif()
|
|
@ -30,8 +30,3 @@ set(ttvfs_SRC
|
|||
)
|
||||
|
||||
add_library(ttvfs ${ttvfs_SRC})
|
||||
|
||||
install(TARGETS ttvfs DESTINATION lib)
|
||||
|
||||
install(DIRECTORY ./ DESTINATION include/ttvfs
|
||||
FILES_MATCHING PATTERN "*.h")
|
||||
|
|
|
@ -9,8 +9,3 @@ include_directories(${TTVFS_INCLUDE_DIRS})
|
|||
add_library(ttvfs_cfileapi ${cfileapi_SRC})
|
||||
|
||||
target_link_libraries(ttvfs_cfileapi ttvfs)
|
||||
|
||||
install(TARGETS ttvfs_cfileapi DESTINATION lib)
|
||||
|
||||
install(DIRECTORY ./ DESTINATION include/ttvfs
|
||||
FILES_MATCHING PATTERN "*.h")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define VFS_ENABLE_C_API 1
|
||||
|
||||
#include "ttvfs.h"
|
||||
#include <ttvfs.h>
|
||||
#include "ttvfs_stdio.h"
|
||||
#include <assert.h>
|
||||
#include <sstream>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "VFSInternal.h"
|
||||
#include "VFSZipArchiveRef.h"
|
||||
#include <stdio.h>
|
||||
#include "miniz.h"
|
||||
#include <miniz.h>
|
||||
|
||||
|
||||
VFS_NAMESPACE_START
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue