android: set up cmake
This commit is contained in:
parent
cee7c0baa5
commit
6609ff83a7
8 changed files with 61 additions and 21 deletions
|
@ -14,6 +14,9 @@ endif()
|
|||
if (ENABLE_QT)
|
||||
add_subdirectory(citra_qt)
|
||||
endif()
|
||||
if (ANDROID)
|
||||
add_subdirectory(android/app)
|
||||
endif()
|
||||
if (ENABLE_WEB_SERVICE)
|
||||
add_subdirectory(web_service)
|
||||
endif()
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
cmake_minimum_required(VERSION 3.6.0)
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
|
||||
# TODO: actually add files to compile
|
||||
add_library(citra-android STATIC
|
||||
src/main/cpp/dummy.cpp
|
||||
)
|
||||
|
||||
# find Android's log library
|
||||
find_library(log-lib log)
|
||||
|
||||
target_link_libraries(citra-android ${log-lib} core common inih)
|
||||
|
|
|
@ -56,21 +56,20 @@ android {
|
|||
externalNativeBuild {
|
||||
cmake {
|
||||
version getCmakeVersion()
|
||||
path "CMakeLists.txt"
|
||||
path "../../../CMakeLists.txt"
|
||||
}
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
cppFlags "-std=c++17"
|
||||
arguments "-DENABLE_QT=0", // Don't use QT
|
||||
"-DENABLE_SDL2=0", // Don't use SDL
|
||||
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
|
||||
"-DENABLE_CUBEB=0"
|
||||
"-DENABLE_CUBEB=0",
|
||||
"-DANDROID_STL=c++_shared"
|
||||
|
||||
abiFilters "arm64-v8a", "x86_64"
|
||||
abiFilters "arm64-v8a"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
3
src/android/app/src/main/cpp/dummy.cpp
Normal file
3
src/android/app/src/main/cpp/dummy.cpp
Normal file
|
@ -0,0 +1,3 @@
|
|||
int dummy(int a, int b) {
|
||||
return a + b;
|
||||
}
|
|
@ -9,6 +9,9 @@ if ($ENV{CI})
|
|||
elseif($ENV{APPVEYOR})
|
||||
set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME})
|
||||
set(BUILD_TAG $ENV{APPVEYOR_REPO_TAG_NAME})
|
||||
elseif($ENV{BITRISE_IO})
|
||||
set(BUILD_REPOSITORY "$ENV{BITRISEIO_GIT_REPOSITORY_OWNER}/$ENV{BITRISEIO_GIT_REPOSITORY_SLUG}")
|
||||
set(BUILD_TAG $ENV{BITRISE_GIT_TAG})
|
||||
endif()
|
||||
# regex capture the string nightly or canary into CMAKE_MATCH_1
|
||||
string(REGEX MATCH "citra-emu/citra-?(.*)" OUTVAR ${BUILD_REPOSITORY})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue