mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-28 21:52:39 +00:00
97 lines
2.8 KiB
Diff
97 lines
2.8 KiB
Diff
--- a/cube/CMakeLists.txt
|
|
+++ b/cube/CMakeLists.txt
|
|
@@ -61,11 +61,7 @@
|
|
endif()
|
|
endif()
|
|
|
|
-if(ANDROID OR APPLE)
|
|
- set(WSI_DISPLAY_DEFAULT_SETTING "OFF")
|
|
-else()
|
|
set(WSI_DISPLAY_DEFAULT_SETTING "ON")
|
|
-endif()
|
|
|
|
option(BUILD_WSI_DISPLAY_SUPPORT "Build DISPLAY WSI support" ${WSI_DISPLAY_DEFAULT_SETTING})
|
|
|
|
@@ -169,8 +165,6 @@
|
|
if(WIN32)
|
|
add_definitions(-DWIN32_LEAN_AND_MEAN -DNOMINMAX)
|
|
list(APPEND ENABLED_CUBE_PLATFORMS VK_USE_PLATFORM_WIN32_KHR)
|
|
-elseif(ANDROID)
|
|
- list(APPEND ENABLED_CUBE_PLATFORMS VK_USE_PLATFORM_ANDROID_KHR)
|
|
elseif(APPLE)
|
|
list(APPEND ENABLED_CUBE_PLATFORMS VK_USE_PLATFORM_METAL_EXT)
|
|
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux|BSD|GNU")
|
|
@@ -233,13 +227,6 @@
|
|
|
|
if(APPLE)
|
|
add_subdirectory(macOS/cube)
|
|
-elseif (ANDROID)
|
|
- add_library(vkcube MODULE)
|
|
-
|
|
- target_sources(vkcube PRIVATE cube.c)
|
|
-
|
|
- add_subdirectory(android)
|
|
-
|
|
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux|BSD|GNU")
|
|
add_executable(vkcube)
|
|
target_sources(vkcube PRIVATE
|
|
@@ -287,9 +274,7 @@
|
|
target_include_directories(vkcube PRIVATE .)
|
|
target_link_libraries(vkcube ${CMAKE_DL_LIBS} Vulkan::Headers)
|
|
|
|
-if (ANDROID)
|
|
- install(TARGETS vkcube DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
-elseif(APPLE)
|
|
+if(APPLE)
|
|
install(
|
|
TARGETS vkcube
|
|
# Install runtime dependencies like the Vulkan::Loader so the app is self-contained
|
|
@@ -303,9 +288,6 @@
|
|
install(TARGETS vkcube)
|
|
endif()
|
|
|
|
-if (ANDROID)
|
|
- return()
|
|
-endif()
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# vkcubepp
|
|
--- a/cube/cube.c
|
|
+++ b/cube/cube.c
|
|
@@ -105,7 +105,7 @@
|
|
fflush(stdout);
|
|
}
|
|
|
|
-#elif defined __ANDROID__
|
|
+#elif defined(__ANDROID__) && !defined(__TERMUX__)
|
|
#include <android/log.h>
|
|
#define ERR_EXIT(err_msg, err_class) \
|
|
do { \
|
|
@@ -647,7 +647,7 @@
|
|
if (!demo->suppress_popups) MessageBox(NULL, message, "Alert", MB_OK);
|
|
in_callback = false;
|
|
|
|
-#elif defined(ANDROID)
|
|
+#elif defined(ANDROID) && !defined(__TERMUX__)
|
|
|
|
if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT) {
|
|
__android_log_print(ANDROID_LOG_INFO, APP_SHORT_NAME, "%s", message);
|
|
@@ -4774,7 +4774,7 @@
|
|
i++;
|
|
continue;
|
|
}
|
|
-#if defined(ANDROID)
|
|
+#if defined(ANDROID) && !defined(__TERMUX__)
|
|
ERR_EXIT("Usage: vkcube [--validate]\n", "Usage");
|
|
#else
|
|
|
|
@@ -4816,7 +4816,7 @@
|
|
}
|
|
strncat(available_wsi_platforms, "win32", max_str_len);
|
|
#endif
|
|
-#if defined(VK_USE_PLATFORM_ANDROID_KHR)
|
|
+#if defined(VK_USE_PLATFORM_ANDROID_KHR) && !defined(__TERMUX__)
|
|
if (strlen(available_wsi_platforms) > 0) {
|
|
strncat(available_wsi_platforms, "|", max_str_len);
|
|
}
|