Various fixes and activated cmake in travis.
This commit is contained in:
@@ -32,6 +32,7 @@ before_install:
|
||||
fi
|
||||
|
||||
install:
|
||||
- sudo apt-get install --force-yes -qq libtinyxml-dev libjpeg-dev libpng-dev libgif-dev libz-dev libsdl2-dev libboost-system-dev libboost-thread-dev libboost-date-time-dev
|
||||
- if [ "$BUILD_PSP" == "YES" ]; then
|
||||
tar -x --xz -f sdk.lzma;
|
||||
fi
|
||||
|
||||
@@ -90,10 +90,10 @@ endmacro()
|
||||
|
||||
macro(FindOrBuildZLIB)
|
||||
if(BUILD_ZLIB)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/zlib)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/zlib)
|
||||
set(ZLIB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/thirdparty/zlib ${CMAKE_BINARY_DIR}/thirdparty/zlib)
|
||||
set(ZLIB_LIBRARIES zlib)
|
||||
else()
|
||||
else()
|
||||
if(WIN32)
|
||||
set(ZLIB_ROOT ${CMAKE_SOURCE_DIR}/thirdparty/binary/win)
|
||||
find_package(ZLIB)
|
||||
@@ -162,12 +162,9 @@ endmacro()
|
||||
|
||||
macro(FindOrBuildFreetype)
|
||||
if(PSP)
|
||||
set(ENV{FREETYPE_DIR} ${CMAKE_SOURCE_DIR}/thirdparty/binary/psp)
|
||||
elseif(WIN32)
|
||||
set(ENV{FREETYPE_DIR} ${CMAKE_SOURCE_DIR}/thirdparty/binary/win)
|
||||
set(ENV{FREETYPE_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/thirdparty/binary/psp/include)
|
||||
set(ENV{FREETYPE_LIBRARIES} freetype)
|
||||
endif()
|
||||
|
||||
find_package(Freetype)
|
||||
endmacro()
|
||||
|
||||
macro(FindOrBuildHgeTools)
|
||||
|
||||
2
thirdparty/libpng/CMakeLists.txt
vendored
2
thirdparty/libpng/CMakeLists.txt
vendored
@@ -18,7 +18,7 @@ SET(SOURCE
|
||||
pngwutil.c )
|
||||
|
||||
add_library(png ${SOURCE})
|
||||
include_directories(${ZLIB_INCLUDE_DIR})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
|
||||
if(operating_system_psp)
|
||||
# -DCHROME_PNG_WRITE_SUPPORT \
|
||||
|
||||
4
thirdparty/unzip/CMakeLists.txt
vendored
4
thirdparty/unzip/CMakeLists.txt
vendored
@@ -5,10 +5,10 @@ SET(SOURCE
|
||||
miniunz.c
|
||||
unzip.c)
|
||||
|
||||
include_directories(${ZLIB_INCLUDE_DIR} ${EXTRA_INCLUDES})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS} ${EXTRA_INCLUDES})
|
||||
|
||||
add_library(unzip ${SOURCE})
|
||||
target_link_libraries(unzip ${ZLIB_LIBRARY})
|
||||
target_link_libraries(unzip ${ZLIB_LIBRARIES})
|
||||
|
||||
if(PSP OR UNIX)
|
||||
set_target_properties(unzip PROPERTIES COMPILE_FLAGS "-Dunix")
|
||||
|
||||
@@ -34,50 +34,40 @@ cd ../../../..
|
||||
|
||||
# we're building a PSP binary here
|
||||
if [ "$BUILD_PSP" = "YES" ]; then
|
||||
echo PSPDEV = $PSPDEV
|
||||
echo psp-config = `psp-config --psp-prefix`
|
||||
cd JGE
|
||||
make -j 4
|
||||
mkdir build_psp
|
||||
cd build_psp
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=../CMakeModules/psp.toolchain.cmake ..
|
||||
make -j8
|
||||
cd ..
|
||||
cd projects/mtg
|
||||
mkdir objs
|
||||
make -j 4
|
||||
mkdir WTH
|
||||
mkdir WTH/Res
|
||||
mv EBOOT.PBP WTH/
|
||||
mv ../../JGE/exceptionHandler/prx/exception.prx WTH/
|
||||
cp ../../core.zip WTH/Res
|
||||
cd WTH/Res
|
||||
unzip core.zip
|
||||
rm core.zip
|
||||
cd ..
|
||||
chmod -R 775 Res
|
||||
cd ..
|
||||
zip psprelease.zip -r WTH/
|
||||
cd ../..
|
||||
fi
|
||||
|
||||
# we're building an Android binary here
|
||||
if [ "$BUILD_ANDROID" = "YES" ]; then
|
||||
android-ndk-r9/ndk-build -C projects/mtg/Android -j4
|
||||
$ANDROID list targets
|
||||
$ANDROID update project -t 1 -p projects/mtg/Android
|
||||
ant debug -f projects/mtg/Android/build.xml
|
||||
mkdir build_sdl
|
||||
cd build_sdl
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=../CMakeModules/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=android-10
|
||||
make -j8
|
||||
cd ..
|
||||
fi
|
||||
|
||||
# we're building a Qt version with GUI here
|
||||
if [ "$BUILD_Qt" = "YES" ]; then
|
||||
mkdir qt-gui-build
|
||||
cd qt-gui-build
|
||||
$QMAKE ../projects/mtg/wagic-qt.pro CONFIG+=release CONFIG+=graphics
|
||||
make -j 4
|
||||
cd ..
|
||||
mkdir build_qt_widget
|
||||
cd build_qt_widget
|
||||
cmake -Dbackend_qt_widget=ON -Dbackend_qt_console=OFF ..
|
||||
make -j8
|
||||
cd ..
|
||||
|
||||
# let's try an Intel linux binary in debug text-mode-only
|
||||
$QMAKE projects/mtg/wagic-qt.pro CONFIG+=console CONFIG+=debug DEFINES+=CAPTURE_STDERR
|
||||
make -j 4
|
||||
mkdir build_qt_console
|
||||
cd build_qt_console
|
||||
cmake -Dbackend_qt_console=ON ..
|
||||
make -j8
|
||||
cd ..
|
||||
|
||||
# Now we run the testsuite (Res needs to be in the working directory)
|
||||
cd projects/mtg
|
||||
../../wagic
|
||||
./../../build_qt_console/bin/wagic
|
||||
cd ../..
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user