|
@@ -17,6 +17,7 @@ list(POP_BACK ANDROID_JAR_VERSIONS ANDROID_JAR_LATEST)
|
|
set(ANDROID_JAR "${ANDROID_JAR_LATEST}/android.jar" CACHE PATH "Path to Android JAR")
|
|
set(ANDROID_JAR "${ANDROID_JAR_LATEST}/android.jar" CACHE PATH "Path to Android JAR")
|
|
|
|
|
|
set(FREETYPE_SRC_DIR "${FREETYPE_SRC_DIR}" CACHE PATH "Path to Freetype source")
|
|
set(FREETYPE_SRC_DIR "${FREETYPE_SRC_DIR}" CACHE PATH "Path to Freetype source")
|
|
|
|
+set(PNG_SRC_DIR "${PNG_SRC_DIR_SRC_DIR}" CACHE PATH "Path to PNG source")
|
|
set(LAGUI_SRC_DIR "${LAGUI_SRC_DIR}" CACHE PATH "Path to LaGUI source")
|
|
set(LAGUI_SRC_DIR "${LAGUI_SRC_DIR}" CACHE PATH "Path to LaGUI source")
|
|
set(EXECUTABLE_NAME "${EXECUTABLE_NAME}" CACHE PATH "Executable name")
|
|
set(EXECUTABLE_NAME "${EXECUTABLE_NAME}" CACHE PATH "Executable name")
|
|
set(EXECUTABLE_SRC_DIR "${EXECUTABLE_SRC_DIR}" CACHE PATH "Executable source")
|
|
set(EXECUTABLE_SRC_DIR "${EXECUTABLE_SRC_DIR}" CACHE PATH "Executable source")
|
|
@@ -38,8 +39,24 @@ macro(setup_variant VARIANT)
|
|
-DANDROID_NDK=${ANDROID_NDK}
|
|
-DANDROID_NDK=${ANDROID_NDK}
|
|
-DANDROID_STL=c++_static
|
|
-DANDROID_STL=c++_static
|
|
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/install/${VARIANT}
|
|
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/install/${VARIANT}
|
|
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${APK_CONTENTS_ROOT}/lib/${VARIANT}
|
|
|
|
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${APK_CONTENTS_ROOT}/lib/${VARIANT}
|
|
|
|
|
|
+ #-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${APK_CONTENTS_ROOT}/lib/${VARIANT}
|
|
|
|
+ #-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${APK_CONTENTS_ROOT}/lib/${VARIANT}
|
|
|
|
+ -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake
|
|
|
|
+ BUILD_ALWAYS True
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+ ExternalProject_Add(png-${VARIANT}
|
|
|
|
+ SOURCE_DIR ${PNG_SRC_DIR}
|
|
|
|
+ #EXCLUDE_FROM_ALL TRUE
|
|
|
|
+ CMAKE_ARGS
|
|
|
|
+ -DANDROID_ABI=${VARIANT}
|
|
|
|
+ -DANDROID_NDK=${ANDROID_NDK}
|
|
|
|
+ -DANDROID_STL=c++_static
|
|
|
|
+ -DPNG_SHARED=OFF
|
|
|
|
+ -DHAVE_LD_VERSION_SCRIPT=OFF
|
|
|
|
+ -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/install/${VARIANT}
|
|
|
|
+ #-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${APK_CONTENTS_ROOT}/lib/${VARIANT}
|
|
|
|
+ #-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${APK_CONTENTS_ROOT}/lib/${VARIANT}
|
|
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake
|
|
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake
|
|
BUILD_ALWAYS True
|
|
BUILD_ALWAYS True
|
|
)
|
|
)
|
|
@@ -53,12 +70,13 @@ macro(setup_variant VARIANT)
|
|
-DANDROID_STL=c++_static
|
|
-DANDROID_STL=c++_static
|
|
-DLAGUI_USE_GLES=True
|
|
-DLAGUI_USE_GLES=True
|
|
-DLAGUI_USE_LUAJIT=False
|
|
-DLAGUI_USE_LUAJIT=False
|
|
- -DLAGUI_USE_PNG=False
|
|
|
|
|
|
+ -DLAGUI_USE_PNG=True
|
|
-DLAGUI_ANDROID=True
|
|
-DLAGUI_ANDROID=True
|
|
-DFREETYPE_SRC_DIR=${FREETYPE_SRC_DIR}
|
|
-DFREETYPE_SRC_DIR=${FREETYPE_SRC_DIR}
|
|
|
|
+ -DPNG_SRC_DIR=${PNG_SRC_DIR}
|
|
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/install/${VARIANT}
|
|
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/install/${VARIANT}
|
|
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${APK_CONTENTS_ROOT}/lib/${VARIANT}
|
|
|
|
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${APK_CONTENTS_ROOT}/lib/${VARIANT}
|
|
|
|
|
|
+ #-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${APK_CONTENTS_ROOT}/lib/${VARIANT}
|
|
|
|
+ #-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${APK_CONTENTS_ROOT}/lib/${VARIANT}
|
|
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake
|
|
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake
|
|
BUILD_ALWAYS True
|
|
BUILD_ALWAYS True
|
|
)
|
|
)
|
|
@@ -70,20 +88,28 @@ macro(setup_variant VARIANT)
|
|
-DANDROID_ABI=${VARIANT}
|
|
-DANDROID_ABI=${VARIANT}
|
|
-DANDROID_NDK=${ANDROID_NDK}
|
|
-DANDROID_NDK=${ANDROID_NDK}
|
|
-DANDROID_STL=c++_static
|
|
-DANDROID_STL=c++_static
|
|
|
|
+ -DLAGUI_SRC_DIR=${LAGUI_SRC_DIR}
|
|
|
|
+ -DLAGUI_USE_GLES=True
|
|
|
|
+ -DLAGUI_USE_LUAJIT=False
|
|
|
|
+ -DLAGUI_USE_PNG=True
|
|
|
|
+ -DLAGUI_ANDROID=True
|
|
|
|
+ -DFREETYPE_SRC_DIR=${FREETYPE_SRC_DIR}
|
|
|
|
+ -DLAGUI_SRC_DIR=${LAGUI_SRC_DIR}
|
|
|
|
+ -DPNG_SRC_DIR=${PNG_SRC_DIR}
|
|
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/install/${VARIANT}
|
|
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/install/${VARIANT}
|
|
- #-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${APK_CONTENTS_ROOT}/lib/${VARIANT}
|
|
|
|
- #-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${APK_CONTENTS_ROOT}/lib/${VARIANT}
|
|
|
|
|
|
+ -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${APK_CONTENTS_ROOT}/lib/${VARIANT}
|
|
|
|
+ -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${APK_CONTENTS_ROOT}/lib/${VARIANT}
|
|
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake
|
|
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake
|
|
BUILD_ALWAYS True
|
|
BUILD_ALWAYS True
|
|
)
|
|
)
|
|
|
|
|
|
endmacro()
|
|
endmacro()
|
|
setup_variant(arm64-v8a)
|
|
setup_variant(arm64-v8a)
|
|
-setup_variant(armeabi-v7a)
|
|
|
|
-setup_variant(x86)
|
|
|
|
|
|
+#setup_variant(armeabi-v7a)
|
|
|
|
+#setup_variant(x86)
|
|
setup_variant(x86_64)
|
|
setup_variant(x86_64)
|
|
|
|
|
|
-set(MANIFEST "${CMAKE_CURRENT_SOURCE_DIR}/AndroidManifest.xml")
|
|
|
|
|
|
+set(MANIFEST "${CMAKE_CURRENT_SOURCE_DIR}/src/AndroidManifest.xml")
|
|
set(RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/res")
|
|
set(RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/res")
|
|
set(KEYSTORE "${CMAKE_CURRENT_SOURCE_DIR}/keystore.jks")
|
|
set(KEYSTORE "${CMAKE_CURRENT_SOURCE_DIR}/keystore.jks")
|
|
|
|
|
|
@@ -112,14 +138,16 @@ add_custom_command(
|
|
WORKING_DIRECTORY ${APK_CONTENTS_ROOT}
|
|
WORKING_DIRECTORY ${APK_CONTENTS_ROOT}
|
|
DEPENDS
|
|
DEPENDS
|
|
${RESOURCES_APK}
|
|
${RESOURCES_APK}
|
|
- ${PROJECT_NAME}-armeabi-v7a
|
|
|
|
- ${PROJECT_NAME}-arm64-v8a
|
|
|
|
- ${PROJECT_NAME}-x86
|
|
|
|
- ${PROJECT_NAME}-x86_64
|
|
|
|
|
|
+ #${EXECUTABLE_NAME}-armeabi-v7a
|
|
|
|
+ ${EXECUTABLE_NAME}-arm64-v8a
|
|
|
|
+ #${EXECUTABLE_NAME}-x86
|
|
|
|
+ ${EXECUTABLE_NAME}-x86_64
|
|
freetype-x86_64
|
|
freetype-x86_64
|
|
- freetype-x86
|
|
|
|
|
|
+ #freetype-x86
|
|
freetype-arm64-v8a
|
|
freetype-arm64-v8a
|
|
- freetype-armeabi-v7a
|
|
|
|
|
|
+ #freetype-armeabi-v7a
|
|
|
|
+ png-x86_64
|
|
|
|
+ png-arm64-v8a
|
|
)
|
|
)
|
|
add_custom_command(
|
|
add_custom_command(
|
|
OUTPUT ${FINAL_APK}
|
|
OUTPUT ${FINAL_APK}
|