mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2025-12-20 04:30:11 +01:00
Rename KERNEL_DIR to KERNEL_HEADER_DIR
Renames KERNEL_DIR to KERNEL_HEADER_DIR to allow getting the kernel headers from a directory that is not coupled with the kernel source tree. Change-Id: Ic98b39dd2ec117ef4bc413cb3bf86eee89ebe4fd Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
This commit is contained in:
parent
cd19e3827b
commit
be2fee5043
2 changed files with 9 additions and 9 deletions
|
|
@ -104,18 +104,18 @@ if(NOT SELECT_EXTERNAL_ALLOCATOR STREQUAL "none" AND EXTERNAL_WSIALLOC_LIBRARY S
|
|||
if(SELECT_EXTERNAL_ALLOCATOR STREQUAL "ion")
|
||||
target_sources(wsialloc PRIVATE util/wsialloc/wsialloc_ion.c util/wsialloc/wsialloc_helpers.c)
|
||||
target_link_libraries(wsialloc drm_utils)
|
||||
if(DEFINED KERNEL_DIR)
|
||||
target_include_directories(wsialloc PRIVATE "${KERNEL_DIR}/drivers/staging/android/uapi")
|
||||
if(DEFINED KERNEL_HEADER_DIR)
|
||||
target_include_directories(wsialloc PRIVATE "${KERNEL_HEADER_DIR}")
|
||||
else()
|
||||
message(FATAL_ERROR "KERNEL_DIR must be defined as the root of the Linux kernel source.")
|
||||
message(FATAL_ERROR "KERNEL_HEADER_DIR must be defined as the directory that includes the kernel headers.")
|
||||
endif()
|
||||
elseif(SELECT_EXTERNAL_ALLOCATOR STREQUAL "dma_buf_heaps")
|
||||
target_sources(wsialloc PRIVATE util/wsialloc/wsialloc_dma_buf_heaps.c util/wsialloc/wsialloc_helpers.c)
|
||||
target_link_libraries(wsialloc drm_utils)
|
||||
if(DEFINED KERNEL_DIR)
|
||||
target_include_directories(wsialloc PRIVATE "${KERNEL_DIR}/usr/include")
|
||||
if(DEFINED KERNEL_HEADER_DIR)
|
||||
target_include_directories(wsialloc PRIVATE "${KERNEL_HEADER_DIR}")
|
||||
else()
|
||||
message(FATAL_ERROR "KERNEL_DIR must be defined as the root of the Linux kernel source.")
|
||||
message(FATAL_ERROR "KERNEL_HEADER_DIR must be defined as the directory that includes the kernel headers.")
|
||||
endif()
|
||||
add_definitions(-Ulinux -DWSIALLOC_MEMORY_HEAP_NAME=${WSIALLOC_MEMORY_HEAP_NAME})
|
||||
else()
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ make -C build
|
|||
In order to build with Wayland support the `BUILD_WSI_WAYLAND` build option
|
||||
must be used, the `SELECT_EXTERNAL_ALLOCATOR` option has to be set to
|
||||
a graphics memory allocator (currently only ion and dma_buf_heaps are supported) and
|
||||
the `KERNEL_DIR` option must be defined as the root of the Linux kernel
|
||||
the `KERNEL_HEADER_DIR` option must be defined as the directory that includes the kernel headers.
|
||||
source.
|
||||
|
||||
```
|
||||
|
|
@ -98,7 +98,7 @@ cmake . -DVULKAN_CXX_INCLUDE="path/to/vulkan-header" \
|
|||
-DBUILD_WSI_HEADLESS=0 \
|
||||
-DBUILD_WSI_WAYLAND=1 \
|
||||
-DSELECT_EXTERNAL_ALLOCATOR=ion \
|
||||
-DKERNEL_DIR="path/to/linux-kernel-source"
|
||||
-DKERNEL_HEADER_DIR="path/to/linux-kernel-headers"
|
||||
```
|
||||
|
||||
In the command line above, `-DBUILD_WSI_HEADLESS=0` is used to disable support
|
||||
|
|
@ -111,7 +111,7 @@ using the `EXTERNAL_WSIALLOC_LIBRARY` option. For example,
|
|||
cmake . -DVULKAN_CXX_INCLUDE="path/to/vulkan-header" \
|
||||
-DBUILD_WSI_WAYLAND=1 \
|
||||
-DEXTERNAL_WSIALLOC_LIBRARY="path/to/custom/libwsialloc" \
|
||||
-DKERNEL_DIR="path/to/linux-kernel-source"
|
||||
-DKERNEL_HEADER_DIR="path/to/linux-kernel-headers"
|
||||
```
|
||||
|
||||
The `EXTERNAL_WSIALLOC_LIBRARY` option allows to specify the path to a library
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue