Forráskód Böngészése

Suppress CMake unused variable warning for Android platform.

Yao Wei Tjong 姚伟忠 11 éve
szülő
commit
ec390c2913
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      Source/CMake/Modules/Urho3D-CMake-common.cmake

+ 1 - 1
Source/CMake/Modules/Urho3D-CMake-common.cmake

@@ -125,7 +125,7 @@ if (ANDROID)
     cmake_dependent_option (ANDROID_NDK_GDB "Enable ndk-gdb for debugging (Android build only)" FALSE "CMAKE_BUILD_TYPE STREQUAL Debug" FALSE)
     cmake_dependent_option (ANDROID_NDK_GDB "Enable ndk-gdb for debugging (Android build only)" FALSE "CMAKE_BUILD_TYPE STREQUAL Debug" FALSE)
 else ()
 else ()
     unset (ANDROID_NDK_GDB CACHE)
     unset (ANDROID_NDK_GDB CACHE)
-    if (ANDROID_ABI)
+    if (ANDROID_ABI AND ANDROID_NATIVE_API_LEVEL)
         # Just reference it to suppress "unused variable" CMake warning on non-Android project
         # Just reference it to suppress "unused variable" CMake warning on non-Android project
         # Due to the design of cmake_gcc.sh currently, the script can be used to configure/generate Android project and other non-Android projects in one go
         # Due to the design of cmake_gcc.sh currently, the script can be used to configure/generate Android project and other non-Android projects in one go
     endif ()
     endif ()