You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Add a separate nativeSrcsConfigs module to handle Android Studio constraints for native code editor support.
(cherry picked from commit edf762fba6)
This commit is contained in:
committed by
Rémi Verschelde
parent
3b547457d7
commit
835d4535b7
@@ -1,18 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
project(godot)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
set(GODOT_ROOT_DIR ../../../..)
|
||||
|
||||
# Get sources
|
||||
file(GLOB_RECURSE SOURCES ${GODOT_ROOT_DIR}/*.c**)
|
||||
file(GLOB_RECURSE HEADERS ${GODOT_ROOT_DIR}/*.h**)
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
SYSTEM PUBLIC
|
||||
${GODOT_ROOT_DIR}
|
||||
${GODOT_ROOT_DIR}/modules/gdnative/include)
|
||||
@@ -18,6 +18,11 @@ android {
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility versions.javaVersion
|
||||
targetCompatibility versions.javaVersion
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
disable 'MissingTranslation', 'UnusedResources'
|
||||
@@ -50,15 +55,6 @@ android {
|
||||
|
||||
def buildType = variant.buildType.name.capitalize()
|
||||
|
||||
def taskPrefix = ""
|
||||
if (project.path != ":") {
|
||||
taskPrefix = project.path + ":"
|
||||
}
|
||||
|
||||
// Disable the externalNativeBuild* task as it would cause build failures since the cmake build
|
||||
// files is only setup for editing support.
|
||||
gradle.startParameter.excludedTaskNames += taskPrefix + "externalNativeBuild" + buildType
|
||||
|
||||
def releaseTarget = buildType.toLowerCase()
|
||||
if (releaseTarget == null || releaseTarget == "") {
|
||||
throw new GradleException("Invalid build type: " + buildType)
|
||||
@@ -78,10 +74,4 @@ android {
|
||||
// Schedule the tasks so the generated libs are present before the aar file is packaged.
|
||||
tasks["merge${buildType}JniLibFolders"].dependsOn taskName
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path "CMakeLists.txt"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user