Commit 58a96c77 authored by djyt's avatar djyt
Browse files

Merge branch 'master' into develop

parents 43b31ae3 2fa13578
......@@ -37,7 +37,7 @@ Build
### MingGW
cmake -G "MinGW Makefiles" ../cmake
cmake -G "MinGW Makefiles" -DTARGET=mingw ../cmake
mingw32-make
### Visual Studio 2010
......
cmake_minimum_required (VERSION 2.6.2)
project (cannonball)
set(DCMAKE default.cmake)
set(CMDIR ../cmake)
# Uncomment for debug output
#set(Boost_DEBUG 1)
......@@ -8,7 +10,19 @@ project (cannonball)
set(main_cpp_base ../src/main)
# Include relevant CMAKE file (default, mingw, pandora etc.)
include(default.cmake)
if(TARGET)
set(TCMAKE ${TARGET}.cmake)
if(EXISTS ${CMDIR}/${TCMAKE})
message("CMake files for ${TARGET} found, using ${TCMAKE}")
include(${TCMAKE})
else()
message("CMake files for ${TARGET} not found, using ${DCMAKE}")
include(${DCMAKE})
endif()
else()
message("TARGET not passed, using ${DCMAKE}")
include(${DCMAKE})
endif(TARGET)
set(BOOST_INCLUDEDIR ${lib_base}/boost_1_51_0)
find_package(Boost REQUIRED)
......@@ -179,4 +193,4 @@ add_executable(cannonball ${SRCS})
# Copy Configuration file to current build
configure_file(../res/config.xml ./config.xml
COPYONLY
)
\ No newline at end of file
)
# Default CMake Setup. Used for Debian Builds.
set(lib_base /usr/include)
set(sdl_root ${lib_base}/SDL)
include_directories("${sdl_root}")
link_libraries(cannonball
SDL
SDLmain
)
# Linking
link_directories(
"${sdl_root}/lib"
)
# Location for Cannonball to create save files
# Used to auto-generate setup.hpp with various file paths
set(xml_directory ./)
set(sdl_flags "SDL_DOUBLEBUF | SDL_SWSURFACE")
# Default CMake Setup. Used for Raspberry Pi (Raspbian) Builds.
set(lib_base /usr/include)
set(sdl_root ${lib_base}/SDL)
include_directories("${sdl_root}")
link_libraries(cannonball
SDL
SDLmain
)
# Linking
link_directories(
"${sdl_root}/lib"
)
add_definitions(-O3 -march=armv6 -mfpu=vfp -mfloat-abi=hard)
# Location for Cannonball to create save files
# Used to auto-generate setup.hpp with various file paths
set(xml_directory ./)
set(sdl_flags "SDL_DOUBLEBUF | SDL_HWSURFACE")
......@@ -61,7 +61,7 @@ static void process_events(void)
case SDL_KEYDOWN:
// Handle key presses.
if (event.key.keysym.sym == SDLK_ESCAPE)
quit_func(0);
state = config.menu.enabled ? STATE_INIT_MENU : STATE_QUIT;
else
input.handle_key_down(&event.key.keysym);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment