file(COPY tri.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
file(COPY vulkaninfo.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
else()
- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/tri-vert.spv
- COMMAND ${GLSLANG_VALIDATOR} -s -V -o tri-vert.spv ${PROJECT_SOURCE_DIR}/demos/tri.vert
- DEPENDS tri.vert ${GLSLANG_VALIDATOR}
- )
- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/tri-frag.spv
- COMMAND ${GLSLANG_VALIDATOR} -s -V -o tri-frag.spv ${PROJECT_SOURCE_DIR}/demos/tri.frag
- DEPENDS tri.frag ${GLSLANG_VALIDATOR}
- )
- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.spv
- COMMAND ${GLSLANG_VALIDATOR} -s -V -o cube-vert.spv ${PROJECT_SOURCE_DIR}/demos/cube.vert
- DEPENDS cube.vert ${GLSLANG_VALIDATOR}
- )
-
- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.spv
- COMMAND ${GLSLANG_VALIDATOR} -s -V -o cube-frag.spv ${PROJECT_SOURCE_DIR}/demos/cube.frag
- DEPENDS cube.frag ${GLSLANG_VALIDATOR}
- )
+ if (${CMAKE_SYSTEM_PROCESSOR} EQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/tri-vert.spv
+ COMMAND ${GLSLANG_VALIDATOR} -s -V -o tri-vert.spv ${PROJECT_SOURCE_DIR}/demos/tri.vert
+ DEPENDS tri.vert ${GLSLANG_VALIDATOR}
+ )
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/tri-frag.spv
+ COMMAND ${GLSLANG_VALIDATOR} -s -V -o tri-frag.spv ${PROJECT_SOURCE_DIR}/demos/tri.frag
+ DEPENDS tri.frag ${GLSLANG_VALIDATOR}
+ )
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.spv
+ COMMAND ${GLSLANG_VALIDATOR} -s -V -o cube-vert.spv ${PROJECT_SOURCE_DIR}/demos/cube.vert
+ DEPENDS cube.vert ${GLSLANG_VALIDATOR}
+ )
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.spv
+ COMMAND ${GLSLANG_VALIDATOR} -s -V -o cube-frag.spv ${PROJECT_SOURCE_DIR}/demos/cube.frag
+ DEPENDS cube.frag ${GLSLANG_VALIDATOR}
+ )
+ endif()
endif()
if(NOT WIN32)
target_link_libraries(vulkaninfo ${LIBRARIES})
if(UNIX)
- add_executable(tri tri.c ${CMAKE_BINARY_DIR}/demos/tri-vert.spv ${CMAKE_BINARY_DIR}/demos/tri-frag.spv)
+ if (${CMAKE_SYSTEM_PROCESSOR} EQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
+ add_executable(tri tri.c ${CMAKE_BINARY_DIR}/demos/tri-vert.spv ${CMAKE_BINARY_DIR}/demos/tri-frag.spv)
+ endif()
else()
add_executable(tri WIN32 tri.c ${CMAKE_BINARY_DIR}/demos/tri-vert.spv ${CMAKE_BINARY_DIR}/demos/tri-frag.spv)
endif()
-target_link_libraries(tri ${LIBRARIES})
+if (${CMAKE_SYSTEM_PROCESSOR} EQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
+ target_link_libraries(tri ${LIBRARIES})
+endif()
if(NOT WIN32)
- add_executable(cube cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
- target_link_libraries(cube ${LIBRARIES})
+ if (${CMAKE_SYSTEM_PROCESSOR} EQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
+ add_executable(cube cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
+ target_link_libraries(cube ${LIBRARIES})
+ endif()
else()
if (CMAKE_CL_64)
set (LIB_DIR "Win64")
target_link_libraries(cube ${LIBRARIES} )
endif()
-add_subdirectory(smoke)
-
+if (${CMAKE_SYSTEM_PROCESSOR} EQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
+ add_subdirectory(smoke)
+endif()
endif()
else()
include (FindPkgConfig)
- find_package(XCB REQUIRED)
+ if (BUILD_WSI_XCB_SUPPORT)
+ find_package(XCB REQUIRED)
+ endif()
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
PROPERTIES
COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
if(NOT WIN32)
- target_link_libraries(vk_layer_validation_tests ${LIBVK} ${XCB_LIBRARIES} ${X11_LIBRARIES} gtest gtest_main VkLayer_utils ${GLSLANG_LIBRARIES})
+ if (BUILD_WSI_XCB_SUPPORT AND BUILD_WSI_XLIB_SUPPORT)
+ target_link_libraries(vk_layer_validation_tests ${LIBVK} ${XCB_LIBRARIES} ${X11_LIBRARIES} gtest gtest_main VkLayer_utils ${GLSLANG_LIBRARIES})
+ else()
+ target_link_libraries(vk_layer_validation_tests ${LIBVK} gtest gtest_main VkLayer_utils ${GLSLANG_LIBRARIES})
+ endif()
endif()
if(WIN32)
target_link_libraries(vk_layer_validation_tests ${LIBVK} gtest gtest_main VkLayer_utils ${GLSLANG_LIBRARIES})
('xlib_enabled', ['vkCreateXlibSurfaceKHR']),
('wayland_enabled', ['vkCreateWaylandSurfaceKHR']),
('mir_enabled', ['vkCreateMirSurfaceKHR'])]
+ elif self.wsi == 'Display':
+ instance_extensions=[('wsi_enabled', surface_wsi_instance_exts),
+ ('display_enabled', display_wsi_instance_exts)]
else:
print('Error: Undefined DisplayServer')
instance_extensions=[]
"Xlib",
"Wayland",
"Mir",
+ "Display",
}
subcommands = {