From be2fee504365fe89c5e69b3dfe324fe92f9353eb Mon Sep 17 00:00:00 2001 From: Iason Paraskevopoulos Date: Wed, 30 Oct 2024 15:11:52 +0000 Subject: [PATCH] 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 --- CMakeLists.txt | 12 ++++++------ README.md | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ee36c7d..a998973 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/README.md b/README.md index 3c87119..7df6bc8 100644 --- a/README.md +++ b/README.md @@ -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