mirror of
https://gitee.com/openharmony/third_party_vulkan-loader
synced 2024-12-26 08:58:05 +00:00
ecc82ad5fc
Includes an auto generated layer (GenericLayer) that wraps all api calls. Includes a basic handwritten layer (basicLayer) that wraps a few apis. Adds xglGetProcAddr as a new api, which is used to chain layers together. All layers and loader implement a dispatch table.
15 lines
614 B
CMake
15 lines
614 B
CMake
add_custom_command(OUTPUT dispatch.c ${PROJECT_SOURCE_DIR}/icd/common/icd-dispatch-table.h
|
|
COMMAND ${PROJECT_SOURCE_DIR}/xgl-generate.py loader > dispatch.c
|
|
COMMAND ${PROJECT_SOURCE_DIR}/xgl-generate.py icd-dispatch-table > ${PROJECT_SOURCE_DIR}/icd/common/icd-dispatch-table.h
|
|
DEPENDS ${PROJECT_SOURCE_DIR}/xgl-generate.py
|
|
${PROJECT_SOURCE_DIR}/xgl.py)
|
|
|
|
include_directories(
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
)
|
|
|
|
add_library(XGL SHARED loader.c dispatch.c)
|
|
set_target_properties(XGL PROPERTIES SOVERSION 0)
|
|
target_link_libraries(XGL -ldl -lpthread)
|