diff --git a/CMakeLists.txt b/CMakeLists.txt
index c65be936..826c0596 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,7 +25,7 @@ set(CMAKE_CXX_STANDARD 17)
# hello_imgui_add_app(app_name file1.cpp file2.cpp ...)
#
# Features:
-# * It will automaticaly link the target to the required libraries (hello_imgui, OpenGl, glad, etc)
+# * It will automatically link the target to the required libraries (hello_imgui, OpenGl, glad, etc)
# * It will embed the assets (for desktop, mobile, and emscripten apps)
# * It will perform additional customization (app icon and name on mobile platforms, etc)
set(HELLOIMGUI_CMAKE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/hello_imgui_cmake CACHE STRING "" FORCE)
diff --git a/hello_imgui_cmake/android/apkCMake/apkCMake.cmake b/hello_imgui_cmake/android/apkCMake/apkCMake.cmake
index 0139cdab..a3c657cb 100644
--- a/hello_imgui_cmake/android/apkCMake/apkCMake.cmake
+++ b/hello_imgui_cmake/android/apkCMake/apkCMake.cmake
@@ -1,10 +1,4 @@
-if (NOT DEFINED apkCMake_projectTemplateFolder)
- message(FATAL_ERROR "Please define apkCMake_projectTemplateFolder")
-endif()
-if (NOT DEFINED apkCMake_resTemplateFolder)
- message(FATAL_ERROR "Please define apkCMake_resTemplateFolder")
-endif()
-
+set(apkCMake_projectTemplateFolder ${HELLOIMGUI_CMAKE_PATH}/android/apkCMake/templates/sdl CACHE STRING "" FORCE)
include(${apkCMake_projectTemplateFolder}/apkCMake_makeSymLinks.cmake)
@@ -187,14 +181,10 @@ function(apkCMake_copyAndConfigureDirectoryContent src dst)
endfunction()
-function(apkCMake_addResFolder resFolder)
- set(resOutputFolder ${apkCMake_outputProjectFolder}/app/src/main/res)
- apkCMake_copyDirectoryContent(${resFolder} ${resOutputFolder})
-endfunction()
-
-
function(apkCMake_addTemplateResFolder)
- apkCMake_addResFolder(${apkCMake_resTemplateFolder})
+ set(apkCMake_resTemplateFolder ${HELLOIMGUI_CMAKE_PATH}/android/res)
+ set(resOutputFolder ${apkCMake_outputProjectFolder}/app/src/main/res)
+ apkCMake_copyDirectoryContent(${apkCMake_resTemplateFolder} ${resOutputFolder})
endfunction()
@@ -225,7 +215,6 @@ endfunction()
function(apkCMake_makeAndroidStudioProject appTargetToEmbed assets_location)
- #message(FATAL_ERROR "ANDROID_STL=${ANDROID_STL}")
message(STATUS "apkCMake_makeAndroidStudioProject ${appTargetToEmbed}")
apkCMake_fillVariables(${appTargetToEmbed})
apkCMake_copyAndConfigureDirectoryContent(${apkCMake_projectTemplateFolder}/gradle_template ${apkCMake_outputProjectFolder})
diff --git a/hello_imgui_cmake/android/res/values/colors.xml b/hello_imgui_cmake/android/res/values/colors.xml
deleted file mode 100644
index 03755135..00000000
--- a/hello_imgui_cmake/android/res/values/colors.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
- #3F51B5
- #303F9F
- #FF4081
-
diff --git a/hello_imgui_cmake/android/res/values/strings.xml b/hello_imgui_cmake/android/res/values/strings.xml
deleted file mode 100644
index a632a515..00000000
--- a/hello_imgui_cmake/android/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Demo Docking
-
diff --git a/hello_imgui_cmake/android/res/values/styles.xml b/hello_imgui_cmake/android/res/values/styles.xml
deleted file mode 100644
index ff6c9d2c..00000000
--- a/hello_imgui_cmake/android/res/values/styles.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
diff --git a/hello_imgui_cmake/hello_imgui_add_app.cmake b/hello_imgui_cmake/hello_imgui_add_app.cmake
index 0a2e9050..d0a6fb35 100644
--- a/hello_imgui_cmake/hello_imgui_add_app.cmake
+++ b/hello_imgui_cmake/hello_imgui_add_app.cmake
@@ -86,18 +86,14 @@ endfunction()
function(hello_imgui_platform_customization app_name assets_location)
endfunction()
# But it can be overriden by platform specific implementations, in the following files:
-include(${CMAKE_CURRENT_LIST_DIR}/apple/hello_imgui_apple.cmake)
-include(${CMAKE_CURRENT_LIST_DIR}/android/hello_imgui_android.cmake)
-include(${CMAKE_CURRENT_LIST_DIR}/emscripten/hello_imgui_emscripten.cmake)
-include(${CMAKE_CURRENT_LIST_DIR}/windows/hello_imgui_windows.cmake)
+include(${HELLOIMGUI_CMAKE_PATH}/apple/hello_imgui_apple.cmake)
+include(${HELLOIMGUI_CMAKE_PATH}/android/hello_imgui_android.cmake)
+include(${HELLOIMGUI_CMAKE_PATH}/emscripten/hello_imgui_emscripten.cmake)
+include(${HELLOIMGUI_CMAKE_PATH}/windows/hello_imgui_windows.cmake)
+include(${HELLOIMGUI_CMAKE_PATH}/assets/hello_imgui_assets.cmake)
+include(${HELLOIMGUI_CMAKE_PATH}/android/apkCMake/apkCMake.cmake)
-include(${CMAKE_CURRENT_LIST_DIR}/assets/hello_imgui_assets.cmake)
-
-
-set(apkCMake_projectTemplateFolder ${CMAKE_CURRENT_LIST_DIR}/android/apkCMake/templates/sdl)
-set(apkCMake_resTemplateFolder ${CMAKE_CURRENT_LIST_DIR}/android/res)
-include(${CMAKE_CURRENT_LIST_DIR}/android/apkCMake/apkCMake.cmake)
function(set_bundle_variables_defaults app_name)
if (NOT DEFINED HELLO_IMGUI_BUNDLE_IDENTIFIER_URL_PART)
diff --git a/tools/android/cmake_arm-android.sh b/tools/android/cmake_arm-android.sh
index 2241e051..42631d80 100755
--- a/tools/android/cmake_arm-android.sh
+++ b/tools/android/cmake_arm-android.sh
@@ -1,7 +1,13 @@
#!/usr/bin/env bash
+# Assert we have one parameter and set source_dir to it
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 "
+ exit 1
+fi
+export source_dir=$1
+
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-export source_dir=$THIS_DIR/../..
export android_abi=armeabi-v7a
$THIS_DIR/_impl_cmake_android.sh
diff --git a/tools/android/cmake_arm64-android.sh b/tools/android/cmake_arm64-android.sh
index 928b7013..87b33195 100755
--- a/tools/android/cmake_arm64-android.sh
+++ b/tools/android/cmake_arm64-android.sh
@@ -1,7 +1,13 @@
#!/usr/bin/env bash
+# Assert we have one parameter and set source_dir to it
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 "
+ exit 1
+fi
+export source_dir=$1
+
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-export source_dir=$THIS_DIR/../..
export android_abi=arm64-v8a
$THIS_DIR/_impl_cmake_android.sh