remove most OpenPandora specific items

The only thing that the ENABLE_PANDORA flag does now is to allow the
resolution of 800x480 and using a special theme automatically.
Everything else is 100% "mainline code". This means if someone wants to
package for pandora several system libraries will have to be
handcompiled and shipped in the pnd including:
* >=boost 1.48 (at least one component (locale) requires this)
* >=SDL_mixer 1.2.12
* VorbisFile
This commit is contained in:
Nils Kneuper 2015-04-12 11:05:04 +02:00
parent 3ce8f05219
commit 7513477224
3 changed files with 22 additions and 50 deletions

View file

@ -86,7 +86,7 @@ option(ENABLE_TESTS "Build unit tests")
option(ENABLE_NLS "Enable building of translations" ON)
option(ENABLE_LOW_MEM "Reduce memory usage by removing extra functionality" OFF)
option(ENABLE_OMP "Enables OpenMP, and has additional dependencies" OFF)
option(ENABLE_PANDORA "Add support for the OpenPandora by deactivating libvorbis support and boost filesystem support. This also reduces the SDL_mixer dependency to 1.2 rather than 1.2.12." OFF)
option(ENABLE_PANDORA "Add support for the OpenPandora by adding support for the resolution of 800x480 and switching to a special theme" OFF)
option(ENABLE_SDL_GPU "Enable building with SDL_gpu (experimental" OFF)
option(ENABLE_LIBPNG "Enable support for writing png files (screenshots, images)" ON)
#option(ENABLE_HISTORY "Enable using GNU history for history in lua console" ON) -- This feature is not supported in cmake yet, there is no cmake script to find the lib
@ -552,12 +552,7 @@ if(ENABLE_TOOLS OR ENABLE_GAME OR ENABLE_TESTS)
find_package( SDL_image 1.2 REQUIRED )
endif(ENABLE_TOOLS OR ENABLE_GAME OR ENABLE_TESTS)
if(ENABLE_GAME OR ENABLE_TESTS)
if(ENABLE_PANDORA)
find_package( SDL_mixer 1.2 REQUIRED )
else(ENABLE_PANDORA)
find_package( SDL_mixer 1.2.12 REQUIRED )
endif(ENABLE_PANDORA)
find_package( SDL_mixer 1.2.12 REQUIRED )
find_package( SDL_ttf 2.0.8 REQUIRED )
if(NOT MSVC)
@ -598,10 +593,8 @@ if(ENABLE_GAME)
unset(LIBDBUS_FOUND CACHE)
endif()
if(NOT ENABLE_PANDORA)
find_package( Boost 1.44 REQUIRED COMPONENTS filesystem )
find_package( Boost 1.48 REQUIRED COMPONENTS locale )
endif(NOT ENABLE_PANDORA)
find_package( Boost 1.44 REQUIRED COMPONENTS filesystem )
find_package( Boost 1.48 REQUIRED COMPONENTS locale )
find_package( PNG )
if(ENABLE_LIBPNG AND PNG_FOUND)
@ -619,10 +612,8 @@ if(ENABLE_GAME)
endif(ENABLE_GAME)
if(ENABLE_SERVER)
if(NOT ENABLE_PANDORA)
find_package( Boost 1.44 REQUIRED COMPONENTS filesystem )
find_package( Boost 1.48 REQUIRED COMPONENTS locale )
endif(NOT ENABLE_PANDORA)
find_package( Boost 1.44 REQUIRED COMPONENTS filesystem )
find_package( Boost 1.48 REQUIRED COMPONENTS locale )
endif(ENABLE_SERVER)
if(ENABLE_POT_UPDATE_TARGET)

View file

@ -20,9 +20,7 @@ include_directories(SYSTEM ${PANGOCAIRO_INCLUDE_DIRS} )
include_directories(SYSTEM ${GETTEXT_INCLUDE_DIR} )
include_directories(SYSTEM ${LIBDBUS_INCLUDE_DIRS} )
include_directories(SYSTEM ${LIBINTL_INCLUDE_DIR} )
if(NOT ENABLE_PANDORA)
include_directories(SYSTEM ${VORBISFILE_INCLUDE_DIR} )
endif(NOT ENABLE_PANDORA)
include_directories(SYSTEM ${VORBISFILE_INCLUDE_DIR} )
#optional dependencies
if(SDLIMAGE_INCLUDE_DIR)
@ -93,18 +91,11 @@ else(MSVC)
)
endif(MSVC)
if(NOT ENABLE_PANDORA)
set(common-external-libs
${common-external-libs}
${Boost_FILESYSTEM_LIBRARY}
${Boost_LOCALE_LIBRARY}
)
else(NOT ENABLE_PANDORA)
set(common-external-libs
${common-external-libs}
${LIBINTL_LIBRARY}
)
endif(NOT ENABLE_PANDORA)
set(common-external-libs
${common-external-libs}
${Boost_FILESYSTEM_LIBRARY}
${Boost_LOCALE_LIBRARY}
)
set(game-external-libs
${common-external-libs}
@ -126,12 +117,10 @@ if(ENABLE_LIBPNG AND PNG_FOUND)
)
endif(ENABLE_LIBPNG AND PNG_FOUND)
if(NOT ENABLE_PANDORA)
set(game-external-libs
${game-external-libs}
${VORBISFILE_LIBRARIES}
)
endif(NOT ENABLE_PANDORA)
set(game-external-libs
${game-external-libs}
${VORBISFILE_LIBRARIES}
)
if(MSVC)
set(game-external-libs
@ -255,19 +244,11 @@ set(libwesnoth-core_STAT_SRC
serialization/validator.cpp
)
if(NOT ENABLE_PANDORA)
set(libwesnoth-core_STAT_SRC
${libwesnoth-core_STAT_SRC}
filesystem_boost.cpp
gettext_boost.cpp
)
else(NOT ENABLE_PANDORA)
set(libwesnoth-core_STAT_SRC
${libwesnoth-core_STAT_SRC}
filesystem.cpp
gettext.cpp
)
endif(NOT ENABLE_PANDORA)
set(libwesnoth-core_STAT_SRC
${libwesnoth-core_STAT_SRC}
filesystem_boost.cpp
gettext_boost.cpp
)
# a 'lib' is automatically set in front when creating the library (as in the filename)
# internal reference is the name given here

View file

@ -20,7 +20,7 @@
#include "log.hpp"
#include "serialization/string_utils.hpp"
#include "util.hpp"
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(PANDORA)
#if !defined(_WIN32) && !defined(__APPLE__)
#include "vorbis/vorbisfile.h"
#endif