diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 00000000..42d452eb --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,45 @@ +name: Android + +# Builds _example_integration for Android + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Checkout submodules + run: git submodule update --init --recursive + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'temurin' + +# - name: Setup interactive tmate session +# uses: mxschmitt/action-tmate@v3 + + - name: invoke cmake to create gradle / android studio project + # This will create the project + # build_android/hello_imgui_demodocking_AndroidStudio + run: | + cd _example_integration + mkdir -p external + cd external + ln -s ../../ imgui_bundle + cd .. + mkdir build_android + cd build_android + export ANDROID_HOME=/usr/local/lib/android/sdk + ../external/imgui_bundle/external/hello_imgui/hello_imgui/tools/android/cmake_arm-android.sh .. + + - name: gradlew build + # This will build for all android architectures + run: | + export ANDROID_HOME=/usr/local/lib/android/sdk + cd _example_integration/build_android/imgui_bundle_example_integration_AndroidStudio + ./gradlew build diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml new file mode 100644 index 00000000..42f19a8c --- /dev/null +++ b/.github/workflows/ios.yml @@ -0,0 +1,45 @@ +name: "ios" + +# Builds _example_integration for iOS simulator + +on: + workflow_dispatch: + pull_request: + push: + +jobs: + build: + name: "ios" + runs-on: macos-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v3 + with: + submodules: true + recursive: true + +# - name: Setup interactive tmate session +# uses: mxschmitt/action-tmate@v3 + + + - name: CMake + run: | + cd _example_integration + mkdir -p external + cd external + ln -s ../.. imgui_bundle + cd .. + mkdir build-ios + cd build-ios + cmake .. \ + -GXcode \ + -DCMAKE_TOOLCHAIN_FILE=../external/imgui_bundle/external/hello_imgui/hello_imgui/hello_imgui_cmake/ios-cmake/ios.toolchain.cmake \ + -DHELLOIMGUI_USE_SDL_OPENGL3=ON \ + -DPLATFORM=SIMULATOR64 + + - name: Build for simulator + working-directory: _example_integration/build-ios + run: | + xcodebuild -configuration Release -project imgui_bundle_example_integration.xcodeproj -target ALL_BUILD -arch x86_64 -sdk iphonesimulator diff --git a/.github/workflows/DirectX.yml b/.github/workflows_disabled/DirectX.yml similarity index 100% rename from .github/workflows/DirectX.yml rename to .github/workflows_disabled/DirectX.yml diff --git a/.github/workflows/Metal.yml b/.github/workflows_disabled/Metal.yml similarity index 100% rename from .github/workflows/Metal.yml rename to .github/workflows_disabled/Metal.yml diff --git a/.github/workflows/Vulkan.yml b/.github/workflows_disabled/Vulkan.yml similarity index 100% rename from .github/workflows/Vulkan.yml rename to .github/workflows_disabled/Vulkan.yml diff --git a/.github/workflows/ci_automation_test.yml b/.github/workflows_disabled/ci_automation_test.yml similarity index 100% rename from .github/workflows/ci_automation_test.yml rename to .github/workflows_disabled/ci_automation_test.yml diff --git a/.github/workflows/cpp_lib.yml b/.github/workflows_disabled/cpp_lib.yml similarity index 100% rename from .github/workflows/cpp_lib.yml rename to .github/workflows_disabled/cpp_lib.yml diff --git a/.github/workflows/cpp_lib_with_bindings.yml b/.github/workflows_disabled/cpp_lib_with_bindings.yml similarity index 100% rename from .github/workflows/cpp_lib_with_bindings.yml rename to .github/workflows_disabled/cpp_lib_with_bindings.yml diff --git a/.github/workflows/debug_macos.yml b/.github/workflows_disabled/debug_macos.yml similarity index 100% rename from .github/workflows/debug_macos.yml rename to .github/workflows_disabled/debug_macos.yml diff --git a/.github/workflows/debug_ubuntu.yml b/.github/workflows_disabled/debug_ubuntu.yml similarity index 100% rename from .github/workflows/debug_ubuntu.yml rename to .github/workflows_disabled/debug_ubuntu.yml diff --git a/.github/workflows/debug_win.yml b/.github/workflows_disabled/debug_win.yml similarity index 100% rename from .github/workflows/debug_win.yml rename to .github/workflows_disabled/debug_win.yml diff --git a/.github/workflows/emscripten.yml b/.github/workflows_disabled/emscripten.yml similarity index 100% rename from .github/workflows/emscripten.yml rename to .github/workflows_disabled/emscripten.yml diff --git a/.github/workflows/pip.yml b/.github/workflows_disabled/pip.yml similarity index 100% rename from .github/workflows/pip.yml rename to .github/workflows_disabled/pip.yml diff --git a/.github/workflows/wheels.yml b/.github/workflows_disabled/wheels.yml similarity index 100% rename from .github/workflows/wheels.yml rename to .github/workflows_disabled/wheels.yml diff --git a/CMakeLists.txt b/CMakeLists.txt index c471de0c..574cbdd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ project(imgui_bundle VERSION "1.2.1") # Remember to mirror changes to setup.py! # * It will perform additional customization (app icon and name on mobile platforms, etc) + ############################################################################### # Build Options ############################################################################### @@ -208,6 +209,13 @@ option(IMGUI_BUNDLE_BUILD_CI_AUTOMATION_TESTS "Build CI automation tests" OFF) # Main ############################################################################### +# Avoid building imgui_bundle twice +if(TARGET imgui_bundle) + message(STATUS "imgui_bundle target already defined!") + return() +endif() + + # Everything is built as a static library in imgui_bundle set(BUILD_SHARED_LIBS OFF)