Couple of fixed around Android build with cmake.

This commit is contained in:
ubuntu
2015-11-22 02:22:44 +01:00
parent c4282ce936
commit 49c196814f
6 changed files with 10 additions and 12 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ elseif(WIN32)
include(platforms/win/configure.cmake)
elseif(APPLE)
include(platforms/macosx/configure.cmake)
elseif(UNIX)
elseif(UNIX AND NOT ANDROID)
include(platforms/unix/configure.cmake)
elseif(ANDROID)
include(platforms/android/configure.cmake)
+2 -1
View File
@@ -1,2 +1,3 @@
add_definitions(-DANDROID -DLINUX)
add_definitions(-D_STLP_USE_SIMPLE_NODE_ALLOC -D__arm__ -D_REENTRANT -D_GLIBCXX__PTHREADS)
add_definitions(-D_STLP_USE_SIMPLE_NODE_ALLOC -D__arm__ -D_REENTRANT -D_GLIBCXX__PTHREADS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+1 -1
View File
@@ -1,5 +1,5 @@
add_definitions(-DLINUX)
add_definitions(-DUSERDIR=".wagic")
add_definitions(-DRESDIR="Res")
set(CMAKE_CXX_FLAGS "-stdlib=libc++ -std=c++0x")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++0x")
set(CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
+1 -1
View File
@@ -1,4 +1,4 @@
add_definitions(-DLINUX)
add_definitions(-DUSERDIR=".wagic")
add_definitions(-DRESDIR="Res")
set(CMAKE_CXX_FLAGS "-std=c++0x")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+3 -6
View File
@@ -169,20 +169,17 @@ elseif(backend_sdl)
add_executable(wagic ${MTG_generic_src} ${MTG_sdl_src} src/TestSuiteAI.cpp src/AIPlayerBakaB.cpp)
target_link_libraries(wagic ${JGE_LIBRARY} ${SDL2_LIBRARY} ${OPENGL_LIBRARIES} ${TINYXML_LIBRARIES} ${HGE_LIBRARY} ${ZLIB_LIBRARIES})
elseif(ANDROID)
include_directories(${MTG_INCLUDE_DIRS} ${JGE_INCLUDE_DIRS} ${SDL2_INCLUDE_DIR} ${ZIPFS_INCLUDE_DIR}
${BOOST_INCLUDE_DIRS} ${UNZIP_INCLUDE_DIR} ${HGE_INCLUDE_DIR} ${TINYXML_INCLUDE_DIR})
include_directories(${MTG_INCLUDE_DIRS} ${JGE_INCLUDE_DIRS} ${SDL2_INCLUDE_DIR} ${ZIPFS_INCLUDE_DIR} ${BOOST_INCLUDE_DIRS} ${UNZIP_INCLUDE_DIR} ${HGE_INCLUDE_DIR} ${TINYXML_INCLUDE_DIR})
#we should try to get rid of this hack
add_library(wagic SHARED ${MTG_generic_src} ${MTG_android_sdl_src} src/TestSuiteAI.cpp)
target_link_libraries(wagic ${JGE_LIBRARY} ${SDL2_LIBRARY} ${OPENGL_LIBRARIES} ${TINYXML_LIBRARIES}
${HGE_LIBRARY})
target_link_libraries(wagic ${JGE_LIBRARY} ${SDL2_LIBRARY} ${OPENGL_LIBRARIES} ${TINYXML_LIBRARIES} ${HGE_LIBRARY} ${ZLIB_LIBRARIES})
elseif(WIN32)
include_directories(${EXTRA_INCLUDE_DIR} ${MTG_INCLUDE_DIRS} ${JGE_INCLUDE_DIRS} ${SDL2_INCLUDE_DIR} ${ZIPFS_INCLUDE_DIR}
${Boost_INCLUDE_DIRS} ${UNZIP_INCLUDE_DIR} ${HGE_INCLUDE_DIR} ${TINYXML_INCLUDE_DIR}
${ZLIB_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/thirdparty/binary/win/include)
add_executable(wagic ${MTG_generic_src} ${MTG_sdl_src} src/TestSuiteAI.cpp src/AIPlayerBakaB.cpp)
link_directories(${Boost_LIBRARY_DIR} ${SDL2_LIBRARY_DIR})
target_link_libraries(wagic ${JGE_LIBRARY} ${SDL2_LIBRARY} ${OPENGL_LIBRARIES} ${TINYXML_LIBRARIES}
${BOOST_date_time} ${HGE_LIBRARY} ${CMAKE_SOURCE_DIR}/thirdparty/binary/win/lib/fmodvc.lib ${ZLIB_LIBRARIES})
target_link_libraries(wagic ${JGE_LIBRARY} ${SDL2_LIBRARY} ${OPENGL_LIBRARIES} ${TINYXML_LIBRARIES} ${BOOST_date_time} ${HGE_LIBRARY} ${CMAKE_SOURCE_DIR}/thirdparty/binary/win/lib/fmodvc.lib ${ZLIB_LIBRARIES})
endif()
elseif(backend_psp)
if(PSP)
+2 -2
View File
@@ -660,8 +660,8 @@ bool SdlApp::OnInit()
DebugTrace("Video Display : h " << currentDisplayMode.h << ", w " << currentDisplayMode.w);
#if (defined ANDROID) || (defined IOS)
window_w = pVideoInfo->current_w;
window_h = pVideoInfo->current_h;
window_w = currentDisplayMode.w;
window_h = currentDisplayMode.h;
#else
window_w = ACTUAL_SCREEN_WIDTH;
window_h = ACTUAL_SCREEN_HEIGHT;