pthom / hello_imgui

Hello, Dear ImGui: unleash your creativity in app development and prototyping
https://pthom.github.io/hello_imgui
MIT License
606 stars 91 forks source link

Please set apkCMake_ndkDir #21

Closed warm-dawn closed 2 years ago

warm-dawn commented 2 years ago
-- Library hello_imgui
VERBOSEhello_imgui_bundle_assets_from_folder hello_imgui_demo_minimal /home/hi/hello_imgui/build_android/src/hello_imgui_demos/hello_imgui_demo_minimal/tmp/common_assets
-- apkCMake_makeAndroidStudioProject hello_imgui_demo_minimal
    > apkCMake_projectTemplateFolder=/home/hi/hello_imgui/hello_imgui_cmake/android/apkCMake/templates/sdl
    > ANDROID_HOME=/home/hi/android-sdk-linux/
    > apkCMake_sdkDir=/home/hi/android-sdk-linux/
CMake Error at hello_imgui_cmake/android/apkCMake/apkCMake.cmake:35 (message):
  Please set apkCMake_ndkDir
Call Stack (most recent call first):
  hello_imgui_cmake/android/apkCMake/apkCMake.cmake:73 (apkCMake_fillAndroidSdkVariables)
  hello_imgui_cmake/android/apkCMake/apkCMake.cmake:215 (apkCMake_fillVariables)
  hello_imgui_cmake/hello_imgui_add_app.cmake:60 (apkCMake_makeAndroidStudioProject)
  hello_imgui_cmake/hello_imgui_add_app.cmake:84 (hello_imgui_prepare_app)
  src/hello_imgui_demos/hello_imgui_demo_minimal/CMakeLists.txt:2 (hello_imgui_add_app)

-- Configuring incomplete, errors occurred!
warm-dawn commented 2 years ago

command: ../tools/android/cmake_arm-android.sh -DHELLOIMGUI_CREATE_ANDROID_STUDIO_PROJECT=ON

how to set apkCMake_ndkDir?

pthom commented 2 years ago

Hello,

You are right, there was an issue. I just pushed an update here: https://github.com/pthom/hello_imgui/commit/d25f06cb6395f1795fbae72ef7829850678cbf15

Please update your repo.

If you follow the instructions here, and set ANDROID_HOME + ANDROID_NDK_HOME, then you should be able run cmake. For example:

export ANDROID_HOME=/Users/Me/Library/Android/sdk
export ANDROID_NDK_HOME=/Users/Me//Library/Android/sdk/ndk/21.3.6528147

Android's build is notoriously complex, so I hope this will be enough. Good luck!

warm-dawn commented 2 years ago

thanks a lot!