mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-04-23 11:29:49 +02:00
android: use clang instead of gcc
This commit is contained in:
parent
5b15270aca
commit
f3ba496438
2 changed files with 9 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
# libsuperderpy
|
||||
A game engine for games written in C and Allegro 5.
|
||||
A multiplatform game engine for games written in C and Allegro 5. Supports GNU/Linux, Android, macOS and Windows.
|
||||
|
||||
Used by such games as:
|
||||
- [Super Derpy: Muffin Attack](https://github.com/dos1/SuperDerpy)
|
||||
|
@ -27,7 +27,6 @@ Used by such games as:
|
|||
- [OMG Dragon!](https://github.com/dos1/omgdragon)
|
||||
- [HIT ME](https://github.com/dos1/hitme)
|
||||
- [Boiled Corn](https://github.com/dos1/boiledcorn)
|
||||
- [Amber Quest](https://github.com/dos1/amberquest)
|
||||
|
||||
WIP: The engine is being separated from its games and modularized right now. Stay tuned for documentation and examples soon!
|
||||
|
||||
|
|
|
@ -55,9 +55,9 @@ endif()
|
|||
|
||||
# specify the cross compiler
|
||||
SET(CMAKE_C_COMPILER
|
||||
${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/${ANDROID_ARCH}-gcc${CMAKE_EXECUTABLE_SUFFIX} CACHE PATH "gcc" FORCE)
|
||||
${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/${ANDROID_ARCH}-clang${CMAKE_EXECUTABLE_SUFFIX} CACHE PATH "gcc" FORCE)
|
||||
SET(CMAKE_CXX_COMPILER
|
||||
${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/${ANDROID_ARCH}-g++${CMAKE_EXECUTABLE_SUFFIX} CACHE PATH "gcc" FORCE)
|
||||
${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/${ANDROID_ARCH}-clang++${CMAKE_EXECUTABLE_SUFFIX} CACHE PATH "g++" FORCE)
|
||||
#there may be a way to make cmake deduce these TODO deduce the rest of the tools
|
||||
set(CMAKE_AR
|
||||
${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/${ANDROID_ARCH}-ar${CMAKE_EXECUTABLE_SUFFIX} CACHE PATH "archive" FORCE)
|
||||
|
@ -118,17 +118,17 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
if(ARM_TARGETS STREQUAL "x86")
|
||||
SET(CMAKE_CXX_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID -Wno-psabi")
|
||||
SET(CMAKE_C_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID -Wno-psabi")
|
||||
SET(CMAKE_CXX_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID")
|
||||
SET(CMAKE_C_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID")
|
||||
elseif(ARM_TARGETS STREQUAL "x86_64")
|
||||
SET(CMAKE_CXX_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID -Wno-psabi")
|
||||
SET(CMAKE_C_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID -Wno-psabi")
|
||||
SET(CMAKE_CXX_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID")
|
||||
SET(CMAKE_C_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID")
|
||||
else()
|
||||
#Setup arm specific stuff
|
||||
#It is recommended to use the -mthumb compiler flag to force the generation
|
||||
#of 16-bit Thumb-1 instructions (the default being 32-bit ARM ones).
|
||||
SET(CMAKE_CXX_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID -mthumb -Wno-psabi")
|
||||
SET(CMAKE_C_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID -mthumb -Wno-psabi")
|
||||
SET(CMAKE_CXX_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID -mthumb")
|
||||
SET(CMAKE_C_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID -mthumb")
|
||||
|
||||
#these are required flags for android armv7-a
|
||||
if(WANT_ANDROID_LEGACY)
|
||||
|
|
Loading…
Add table
Reference in a new issue