distribution/packages/graphics/vulkan/vulkan-tools/patches/vulkan-tools-995.03-fix-cube-cross-compile.patch

62 lines
2.2 KiB
Diff
Raw Normal View History

2022-07-01 20:17:33 +00:00
From 8770458f74f4df71bb8450d0adcdd31f3eac7168 Mon Sep 17 00:00:00 2001
From: SupervisedThinking <supervisedthinking@gmail.com>
Date: Wed, 9 Mar 2022 20:58:53 +0100
Subject: [PATCH] cube: allow cross compile
---
cube/CMakeLists.txt | 6 ------
1 file changed, 6 deletions(-)
diff --git a/cube/CMakeLists.txt b/cube/CMakeLists.txt
index 616fbc96a..fa6f8d4fa 100644
--- a/cube/CMakeLists.txt
+++ b/cube/CMakeLists.txt
@@ -228,7 +228,6 @@ include_directories(${CUBE_INCLUDE_DIRS})
if(APPLE)
include(macOS/cube/cube.cmake)
elseif(NOT WIN32)
- if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
add_executable(vkcube
cube.c
${PROJECT_SOURCE_DIR}/cube/cube.vert
@@ -243,7 +242,6 @@ elseif(NOT WIN32)
if (NEED_RT)
target_link_libraries(vkcube rt)
endif()
- endif()
else()
if(CMAKE_CL_64)
set(LIB_DIR "Win64")
@@ -280,7 +278,6 @@ endif()
if(APPLE)
include(macOS/cubepp/cubepp.cmake)
elseif(NOT WIN32)
- if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
add_executable(vkcubepp
cube.cpp
${PROJECT_SOURCE_DIR}/cube/cube.vert
@@ -290,7 +287,6 @@ elseif(NOT WIN32)
${OPTIONAL_WAYLAND_DATA_FILES})
target_link_libraries(vkcubepp Vulkan::Vulkan)
target_compile_definitions(vkcubepp PUBLIC ${CUBE_PLATFORM})
- endif()
else()
if(CMAKE_CL_64)
set(LIB_DIR "Win64")
@@ -334,7 +330,6 @@ if(UNIX AND NOT APPLE) # i.e. Linux
${CMAKE_CURRENT_BINARY_DIR}/xdg-decoration-code.c
${CMAKE_CURRENT_BINARY_DIR}/xdg-decoration-client-header.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
- if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
add_executable(vkcube-wayland
cube.c
${PROJECT_SOURCE_DIR}/cube/cube.vert
@@ -349,7 +344,6 @@ if(UNIX AND NOT APPLE) # i.e. Linux
if (NEED_RT)
target_link_libraries(vkcube-wayland rt)
endif()
- endif()
install(TARGETS vkcube-wayland RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
endif()