From 5f115b4918e6449a9e00ebeaf50a1ccb9051d8b8 Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 22 Aug 2019 01:03:53 +0200 Subject: [PATCH] Require META_ANDROID_PACKAGE_NAME for making Android APKs --- cmake/modules/AndroidApk.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/modules/AndroidApk.cmake b/cmake/modules/AndroidApk.cmake index 9f14e08..d074f10 100644 --- a/cmake/modules/AndroidApk.cmake +++ b/cmake/modules/AndroidApk.cmake @@ -19,6 +19,10 @@ if (NOT EXISTS "${CMAKE_ANDROID_NDK}") message(FATAL_ERROR "CMAKE_ANDROID_NDK must contain the path of the Android NDK.") endif () +if (NOT META_ANDROID_PACKAGE_NAME) + message(FATAL_ERROR "Attempt to load AndroidApk.cmake without having set ANDROID_PACKAGE_NAME.") +endif () + # find "android" subdirectory in the source directory and check for AndroidManifest.xml set(ANDROID_APK_SUBDIR "${CMAKE_CURRENT_SOURCE_DIR}/android") if (NOT IS_DIRECTORY "${ANDROID_APK_SUBDIR}")