diff options
Diffstat (limited to 'meta/recipes-graphics/vulkan/vulkan-samples')
-rw-r--r-- | meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch | 29 | ||||
-rw-r--r-- | meta/recipes-graphics/vulkan/vulkan-samples/debugfix.patch | 31 |
2 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch new file mode 100644 index 0000000000..90fe277a41 --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch @@ -0,0 +1,29 @@ +From 5fb216d35b6846074196e80421f3162df3b9c8cd Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Sun, 1 Nov 2020 23:19:22 +0000 +Subject: [PATCH] CMakeLists.txt: do not hardcode 'lib' as installation target + +Upstream-Status: Inappropriate [already fixed in newer versions] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e00f8c77..f9896eed 100644 +--- a/third_party/spirv-cross/CMakeLists.txt ++++ b/third_party/spirv-cross/CMakeLists.txt +@@ -67,8 +67,8 @@ macro(spirv_cross_add_library name config_name) + install(TARGETS ${name} + EXPORT ${config_name}Config + RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION include/spirv_cross) + install(FILES ${hdrs} DESTINATION include/spirv_cross) + install(EXPORT ${config_name}Config DESTINATION share/${config_name}/cmake) +-- +2.17.1 + diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/debugfix.patch b/meta/recipes-graphics/vulkan/vulkan-samples/debugfix.patch new file mode 100644 index 0000000000..d723fcc19a --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-samples/debugfix.patch @@ -0,0 +1,31 @@ +There is code to remove the prefix CMAKE_SOURCE_DIR from __FILENAME__ paths +used for logging with LOGE() in the code. We need to make this match the value we use +in the debug source remapping from CFLAGS + +We export the right path to use in the recipe with: + +EXTRA_OECMAKE = "-DCMAKE_DEBUG_SRCDIR=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/" + +and we then patch this into the code instead of the broken use +of CMAKE_SOURCE_DIR since __FILENAME__ will match our path prefix +changes. + +This also breaks reproducibility since the path length of the build directory +will currently change the output! + +Upstream-Status: Pending [needs to be discussed upstream] +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Index: git/bldsys/cmake/global_options.cmake +=================================================================== +--- git.orig/bldsys/cmake/global_options.cmake ++++ git/bldsys/cmake/global_options.cmake +@@ -47,7 +47,7 @@ set(CMAKE_CXX_STANDARD 14) + set(CMAKE_DISABLE_SOURCE_CHANGES ON) + set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) + +-string(LENGTH "${CMAKE_SOURCE_DIR}/" ROOT_PATH_SIZE) ++string(LENGTH "${CMAKE_DEBUG_SRCDIR}/" ROOT_PATH_SIZE) + add_definitions(-DROOT_PATH_SIZE=${ROOT_PATH_SIZE}) + + set(CMAKE_C_FLAGS_DEBUG "-DDEBUG=0 ${CMAKE_C_FLAGS_DEBUG}") |