diff --git a/CMakeLists.txt b/CMakeLists.txt index cea0ea45bb..bb79e1dac6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -474,9 +474,10 @@ if(UNIX) endif() message(STATUS "i915 prelim headers detection: ${NEO_ENABLE_i915_PRELIM_DETECTION}") endif() - -get_filename_component(I915_INCLUDES_DIR "${NEO_SOURCE_DIR}/third_party${BRANCH_DIR_SUFFIX}uapi" ABSOLUTE) -message(STATUS "i915 includes dir: ${I915_INCLUDES_DIR}") +if(NOT DEFINED I915_HEADERS_DIR) + get_filename_component(I915_HEADERS_DIR "${NEO_SOURCE_DIR}/third_party${BRANCH_DIR_SUFFIX}uapi" ABSOLUTE) +endif() +message(STATUS "i915 includes dir: ${I915_HEADERS_DIR}") # Enable/Disable BuiltIns compilation during build set(COMPILE_BUILT_INS TRUE CACHE BOOL "Enable built-in kernels compilation") @@ -760,7 +761,12 @@ include_directories(${NEO_SHARED_DIRECTORY}/gen_common${BRANCH_DIR_SUFFIX}) if(WIN32) include_directories(${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory${BRANCH_DIR_SUFFIX}) else() - include_directories(${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory) + include_directories(${I915_HEADERS_DIR} + ${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory + ) + if("${BRANCH_TYPE}" STREQUAL "") + include_directories(${NEO_SOURCE_DIR}/third_party/uapi/prelim) + endif() endif() include_directories(${NEO_SHARED_DIRECTORY}/helpers/definitions${BRANCH_DIR_SUFFIX}) include_directories(${NEO_SHARED_DIRECTORY}/memory_properties${BRANCH_DIR_SUFFIX}) diff --git a/level_zero/CMakeLists.txt b/level_zero/CMakeLists.txt index 79d0182bb1..3aab822e23 100644 --- a/level_zero/CMakeLists.txt +++ b/level_zero/CMakeLists.txt @@ -318,7 +318,6 @@ if(BUILD_WITH_L0) if(UNIX) target_include_directories(${TARGET_NAME_L0} PUBLIC ${L0_ROOT_DIR}/core/source/os_interface/linux - ${I915_INCLUDES_DIR} ) target_include_directories(${TARGET_NAME_L0} PRIVATE ${NEO_SHARED_DIRECTORY}/dll/devices${BRANCH_DIR_SUFFIX} @@ -436,7 +435,6 @@ if(BUILD_WITH_L0) ) else() target_include_directories(${LIB_NAME} PUBLIC - ${I915_INCLUDES_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/os_interface/linux ) endif() diff --git a/level_zero/tools/source/CMakeLists.txt b/level_zero/tools/source/CMakeLists.txt index 51a04b3c78..6139f8ec81 100644 --- a/level_zero/tools/source/CMakeLists.txt +++ b/level_zero/tools/source/CMakeLists.txt @@ -15,11 +15,5 @@ target_sources(${L0_STATIC_LIB_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ) -if((NEO_ENABLE_i915_PRELIM_DETECTION) AND ("${BRANCH_TYPE}" STREQUAL "")) - target_include_directories(${L0_STATIC_LIB_NAME} PUBLIC - ${I915_INCLUDES_DIR}/prelim - ) -endif() - # Make our source files visible to parent set_property(GLOBAL PROPERTY L0_TOOLS_SOURCES ${L0_TOOLS_SOURCES}) diff --git a/level_zero/tools/source/sysman/scheduler/linux/os_scheduler_imp_prelim.cpp b/level_zero/tools/source/sysman/scheduler/linux/os_scheduler_imp_prelim.cpp index 4f322f8e24..27d6f17154 100644 --- a/level_zero/tools/source/sysman/scheduler/linux/os_scheduler_imp_prelim.cpp +++ b/level_zero/tools/source/sysman/scheduler/linux/os_scheduler_imp_prelim.cpp @@ -6,7 +6,7 @@ */ #include "shared/source/os_interface/linux/engine_info.h" -#include "shared/source/os_interface/linux/i915.h" +#include "shared/source/os_interface/linux/i915_prelim.h" #include "level_zero/tools/source/sysman/scheduler/linux/os_scheduler_imp.h" diff --git a/opencl/source/CMakeLists.txt b/opencl/source/CMakeLists.txt index 365383f107..633999c130 100644 --- a/opencl/source/CMakeLists.txt +++ b/opencl/source/CMakeLists.txt @@ -69,7 +69,6 @@ else() target_include_directories(${NEO_STATIC_LIB_NAME} PUBLIC ${NEO_SHARED_DIRECTORY}/os_interface/linux ${NEO_SOURCE_DIR}/opencl/source/os_interface/linux - ${I915_INCLUDES_DIR} ) endif() diff --git a/shared/source/CMakeLists.txt b/shared/source/CMakeLists.txt index 74599e60b7..255d40abd3 100644 --- a/shared/source/CMakeLists.txt +++ b/shared/source/CMakeLists.txt @@ -55,9 +55,9 @@ function(generate_shared_lib LIB_NAME MOCKABLE) ) else() target_include_directories(${LIB_NAME} PUBLIC - ${I915_INCLUDES_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/os_interface/linux ) + endif() create_project_source_tree(${LIB_NAME}) diff --git a/shared/source/os_interface/linux/i915_prelim.h b/shared/source/os_interface/linux/i915_prelim.h index 95aa938409..f94c5755de 100644 --- a/shared/source/os_interface/linux/i915_prelim.h +++ b/shared/source/os_interface/linux/i915_prelim.h @@ -9,7 +9,7 @@ #include namespace NEO { namespace PrelimI915 { -#include "third_party/uapi/prelim/drm/i915_drm.h" +#include "drm/i915_drm_prelim.h" } } // namespace NEO using NEO::PrelimI915::drm_gem_close;