Skip to content

Commit

Permalink
primitives,[textured-]triangle,viewer: Gradle-less Android builds.
Browse files Browse the repository at this point in the history
Because I DON'T HAVE A PATIENCE TO DEAL WITH THAT CRAP ANYMORE.
  • Loading branch information
mosra committed Oct 22, 2019
1 parent 0d6d879 commit d64c155
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/primitives/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ target_link_libraries(magnum-primitives PRIVATE
Magnum::Primitives
Magnum::Shaders)

# Gradle-free Android build
if(CORRADE_TARGET_ANDROID AND CMAKE_ANDROID_NDK)
include(${PROJECT_SOURCE_DIR}/../../toolchains/modules/UseAndroid.cmake)
android_create_apk(magnum-primitives src/main/AndroidManifest.xml)
endif()

# iOS-specific
if(CORRADE_TARGET_IOS)
set_target_properties(magnum-primitives PROPERTIES
Expand Down
6 changes: 6 additions & 0 deletions src/textured-triangle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ target_link_libraries(magnum-textured-triangle PRIVATE
Magnum::Shaders
Magnum::Trade)

# Gradle-free Android build
if(CORRADE_TARGET_ANDROID AND CMAKE_ANDROID_NDK)
include(${PROJECT_SOURCE_DIR}/../../toolchains/modules/UseAndroid.cmake)
android_create_apk(magnum-textured-triangle src/main/AndroidManifest.xml)
endif()

# iOS-specifics
if(CORRADE_TARGET_IOS)
set_target_properties(magnum-textured-triangle PROPERTIES
Expand Down
6 changes: 6 additions & 0 deletions src/triangle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ target_link_libraries(magnum-triangle PRIVATE
Magnum::Magnum
Magnum::Shaders)

# Gradle-free Android build
if(CORRADE_TARGET_ANDROID AND CMAKE_ANDROID_NDK)
include(${PROJECT_SOURCE_DIR}/../../toolchains/modules/UseAndroid.cmake)
android_create_apk(magnum-triangle src/main/AndroidManifest.xml)
endif()

# iOS-specifics
if(CORRADE_TARGET_IOS)
set_target_properties(magnum-triangle PROPERTIES
Expand Down
6 changes: 6 additions & 0 deletions src/viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ if(CORRADE_TARGET_EMSCRIPTEN OR CORRADE_TARGET_ANDROID)
target_link_libraries(magnum-viewer PRIVATE MagnumPlugins::TinyGltfImporter)
endif()

# Gradle-free Android build
if(CORRADE_TARGET_ANDROID AND CMAKE_ANDROID_NDK)
include(${PROJECT_SOURCE_DIR}/../../toolchains/modules/UseAndroid.cmake)
android_create_apk(magnum-viewer src/main/AndroidManifest.xml)
endif()

# Installation for Emscripten
if(CORRADE_TARGET_EMSCRIPTEN)
install(FILES viewer.html DESTINATION ${MAGNUM_DEPLOY_PREFIX}/viewer RENAME index.html)
Expand Down

0 comments on commit d64c155

Please sign in to comment.