Commit 6d8a9c59 by Antonio Maiorano

CMake: fix PowerVR_Examples build

Moved the copy to bin custom command into Vulkan/CMakeLists.txt. We always copy, just like for the GL targets. Bug: b/145758253 Change-Id: Idf3af01b453e202610156eff3b302c41fb0ac292 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43974Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
parent d6d59936
......@@ -754,19 +754,6 @@ if(HAVE_PVR_SUBMODULE AND SWIFTSHADER_BUILD_PVR)
set(PVR_BUILD_EXAMPLES TRUE CACHE BOOL "Build the PowerVR SDK Examples" FORCE)
add_subdirectory(${THIRD_PARTY_DIR}/PowerVR_Examples)
if(NOT APPLE)
# Copy the 'loader' library to the bin/ directory
# where the PowerVR executables are placed.
if(SWIFTSHADER_BUILD_VULKAN)
add_custom_command(
TARGET vk_swiftshader
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:vk_swiftshader> ${CMAKE_BINARY_DIR}/bin/${VULKAN_API_LIBRARY_NAME}
)
endif()
endif()
# Samples known to work well
set(PVR_VULKAN_TARGET_GOOD
VulkanBumpmap
......
......@@ -203,6 +203,10 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}/
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:vk_swiftshader> ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}/
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:vk_swiftshader> ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}/${VULKAN_API_LIBRARY_NAME}
# Copy to ${CMAKE_BINARY_DIR}/bin so the library sits next to the PVR samples.
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:vk_swiftshader> ${CMAKE_BINARY_DIR}/bin/${VULKAN_API_LIBRARY_NAME}
)
# The vk_swiftshader_icd.json manifest file will point to ICD_LIBRARY_PATH.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment