Skip to content

Commit

Permalink
first
Browse files Browse the repository at this point in the history
  • Loading branch information
enenH committed Feb 4, 2024
1 parent 3714aee commit 2ec4cfc
Show file tree
Hide file tree
Showing 29 changed files with 13,237 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
cmake-build-*/
build
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "imgui"]
path = imgui
url = https://github.com/ocornut/imgui.git
62 changes: 62 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
cmake_minimum_required(VERSION 3.27)

if (NOT DEFINED CMAKE_ANDROID_NDK)
set(CMAKE_ANDROID_NDK D:/Android/SDK/ndk/26.1.10909125)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_ANDROID_NDK}/build/cmake/android.toolchain.cmake)
set(CMAKE_SYSTEM_NAME Android)
set(CMAKE_SYSTEM_VERSION 24)
set(CMAKE_ANDROID_ARCH_ABI arm64-v8a)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(ANDROID_ABI arm64-v8a)
set(ANDROID_PLATFORM android-26)
set(ANDROID_NDK ${CMAKE_ANDROID_NDK})
endif ()

project(AndroidImgui)

set(CMAKE_CXX_STANDARD 20)

file(GLOB SOURCES src/*.cpp)

add_library(AndroidImgui STATIC
${SOURCES}

stb/stb_image.c

imgui/imgui.cpp
imgui/imgui_draw.cpp
imgui/imgui_widgets.cpp
imgui/imgui_tables.cpp
imgui/imgui_demo.cpp
imgui/backends/imgui_impl_opengl3.cpp
imgui/backends/imgui_impl_vulkan.cpp)

target_include_directories(AndroidImgui PUBLIC
src
imgui
imgui/backends
stb
)

target_compile_definitions(AndroidImgui PUBLIC
VK_USE_PLATFORM_ANDROID_KHR
IMGUI_IMPL_VULKAN_NO_PROTOTYPES)

target_link_libraries(AndroidImgui
log
android
EGL
GLESv3
z)

#[[
add_executable(AndroidImguiTest
test/main.cpp)
target_link_libraries(AndroidImguiTest
AndroidImgui
log
android
EGL
GLESv3
z)]]
1 change: 1 addition & 0 deletions imgui
Submodule imgui added at 6172c2
5 changes: 5 additions & 0 deletions m.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
REM m.bat | $CMakeCurrentTargetName$ | $ProjectFileDir$
REM adb connect ip:port
adb push cmake-build-debug\%1 /data/local/tmp
adb shell su -c chmod +x /data/local/tmp/%1
adb shell su -c /data/local/tmp/%1 -h
Loading

0 comments on commit 2ec4cfc

Please sign in to comment.