Compare commits
No commits in common. "9a95dba1387802b79a4bdb3c4be8f94a43801108" and "ba7188cf66061327201595023248592d46d25c5b" have entirely different histories.
9a95dba138
...
ba7188cf66
44
.github/workflows/ci.yml
vendored
44
.github/workflows/ci.yml
vendored
@ -29,50 +29,6 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 -t tomato
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 -t tomato
|
||||||
|
|
||||||
android:
|
|
||||||
timeout-minutes: 30
|
|
||||||
# contains sections copied from sdl repo
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- uses: nttld/setup-ndk@v1
|
|
||||||
id: setup_ndk
|
|
||||||
with:
|
|
||||||
local-cache: true
|
|
||||||
ndk-version: r26d
|
|
||||||
|
|
||||||
- uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'temurin'
|
|
||||||
java-version: '17'
|
|
||||||
|
|
||||||
- name: update vcpkg
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/microsoft/vcpkg.git
|
|
||||||
|
|
||||||
- name: Install Dependencies (host)
|
|
||||||
run: sudo apt update && sudo apt -y install cmake pkg-config nasm
|
|
||||||
|
|
||||||
- name: Install Dependencies (target)
|
|
||||||
env:
|
|
||||||
ANDROID_NDK_HOME: ${{steps.setup_ndk.outputs.ndk-path}}
|
|
||||||
run: vcpkg install --triplet arm64-android --overlay-ports=vcpkg/ports libsodium opus libvpx libpng libjpeg-turbo
|
|
||||||
|
|
||||||
# vcpkg scripts root /usr/local/share/vcpkg/scripts
|
|
||||||
- name: Configure CMake
|
|
||||||
env:
|
|
||||||
ANDROID_NDK_HOME: ${{steps.setup_ndk.outputs.ndk-path}}
|
|
||||||
#run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${{steps.setup_ndk.outputs.ndk-path}}/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=23 -DANDROID_ABI=arm64-v8a
|
|
||||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=arm64-android -DANDROID=1 -DANDROID_PLATFORM=23 -DANDROID_ABI=arm64-v8a -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${{steps.setup_ndk.outputs.ndk-path}}/build/cmake/android.toolchain.cmake -DSDL3IMAGE_JPG_SHARED=OFF -DSDL3IMAGE_PNG_SHARED=OFF -DTOMATO_MAIN_SO=ON
|
|
||||||
|
|
||||||
- name: Build (tomato)
|
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 -t tomato
|
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
|||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||||
|
|
||||||
option(TOMATO_MAIN_SO "Build tomato as a shared object (for eg android apps)" ANDROID)
|
|
||||||
option(TOMATO_ASAN "Build tomato with asan (gcc/clang/msvc)" OFF)
|
option(TOMATO_ASAN "Build tomato with asan (gcc/clang/msvc)" OFF)
|
||||||
|
|
||||||
if (TOMATO_ASAN)
|
if (TOMATO_ASAN)
|
||||||
|
@ -1,15 +1,8 @@
|
|||||||
cmake_minimum_required(VERSION 3.9...3.24 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
|
||||||
if (TOMATO_MAIN_SO)
|
add_executable(tomato
|
||||||
add_library(tomato MODULE)
|
|
||||||
target_compile_definitions(tomato PUBLIC TOMATO_MAIN_SO)
|
|
||||||
else()
|
|
||||||
add_executable(tomato)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_sources(tomato PUBLIC
|
|
||||||
./main.cpp
|
./main.cpp
|
||||||
./icon.rc
|
./icon.rc
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user