Ver Fonte

fixed build for latest love-android version

fysx há 11 anos atrás
pai
commit
d0f866e4b0
2 ficheiros alterados com 11 adições e 1 exclusões
  1. 1 0
      jni/love/Android.mk
  2. 10 1
      jni/love/src/love.cpp

+ 1 - 0
jni/love/Android.mk

@@ -88,6 +88,7 @@ LOCAL_SRC_FILES := \
   $(wildcard ${LOCAL_PATH}/src/libraries/enet/*.cpp) \
   $(wildcard ${LOCAL_PATH}/src/libraries/enet/libenet/*.c) \
   $(wildcard ${LOCAL_PATH}/src/libraries/luasocket/*.cpp) \
+  $(wildcard ${LOCAL_PATH}/src/libraries/luautf8/*.c) \
   $(wildcard ${LOCAL_PATH}/src/libraries/luasocket/libluasocket/*.c) \
   $(wildcard ${LOCAL_PATH}/src/libraries/noise1234/*.cpp) \
   $(wildcard ${LOCAL_PATH}/src/libraries/Wuff/*.c) \

+ 10 - 1
jni/love/src/love.cpp

@@ -18,8 +18,12 @@
  * 3. This notice may not be removed or altered from any source distribution.
  **/
 
-#include "common/version.h"
 #include "modules/love/love.h"
+
+#ifndef LOVE_ANDROID
+#include "common/version.h"
+#endif
+
 #include <SDL.h>
 
 #ifdef LOVE_BUILD_EXE
@@ -195,12 +199,17 @@ int main(int argc, char **argv)
 	argv = hack_argv;
 #endif // LOVE_LEGENDARY_APP_ARGV_HACK
 
+#ifndef LOVE_ANDROID
+	// TODO: LOVE for Android creates a single library instead of executable
+	// and library. Therefore this check is not required, but causes a
+	// duplicate definition of the love::VERSION symbol.
 	if (strcmp(love::VERSION, love_version()) != 0)
 	{
 		printf("Version mismatch detected!\nLOVE binary is version %s\n"
 				"LOVE library is version %s\n", love::VERSION, love_version());
 		return 1;
 	}
+#endif
 
 	// Oh, you just want the version? Okay!
 	if (argc > 1 && strcmp(argv[1], "--version") == 0)