Stablize CMake arguments (#2266)
This commit is contained in:
parent
2327e7b398
commit
6d80cd62fd
|
|
@ -125,8 +125,6 @@ fun Project.configureBaseExtension() {
|
|||
cFlags("-std=c18", *flags)
|
||||
arguments(
|
||||
"-DANDROID_STL=none",
|
||||
"-DVERSION_CODE=$verCode",
|
||||
"-DVERSION_NAME=$verName",
|
||||
)
|
||||
findInPath("ccache")?.let {
|
||||
println("Using ccache $it")
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/build
|
||||
/.cxx
|
||||
/src/main/jni/src/config.cpp
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
*/
|
||||
|
||||
val apiCode: Int by rootProject.extra
|
||||
val verName: String by rootProject.extra
|
||||
val verCode: Int by rootProject.extra
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
|
|
@ -43,6 +45,12 @@ android {
|
|||
}
|
||||
}
|
||||
}
|
||||
copy {
|
||||
from("src/main/jni/template/") {
|
||||
expand("VERSION_CODE" to "$verCode", "VERSION_NAME" to verName)
|
||||
}
|
||||
into("src/main/jni/src/")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
|
|
|
|||
|
|
@ -3,12 +3,10 @@ cmake_minimum_required(VERSION 3.4.1)
|
|||
|
||||
add_subdirectory(${EXTERNAL_ROOT} external)
|
||||
|
||||
configure_file(template/config.cpp src/config.cpp)
|
||||
|
||||
aux_source_directory(src SRC_LIST)
|
||||
aux_source_directory(src/jni SRC_LIST)
|
||||
|
||||
add_library(${PROJECT_NAME} STATIC ${SRC_LIST} ${CMAKE_CURRENT_BINARY_DIR}/src/config.cpp)
|
||||
add_library(${PROJECT_NAME} STATIC ${SRC_LIST})
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC include)
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE src)
|
||||
|
|
|
|||
|
|
@ -122,7 +122,6 @@ dependencies {
|
|||
|
||||
val zipAll = task("zipAll") {
|
||||
group = "LSPosed"
|
||||
|
||||
}
|
||||
|
||||
fun afterEval() = android.applicationVariants.forEach { variant ->
|
||||
|
|
|
|||
Loading…
Reference in New Issue