File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,35 @@ elseif(UMF_BUILD_LEVEL_ZERO_PROVIDER)
255255 message (STATUS "Level Zero include directory: ${LEVEL_ZERO_INCLUDE_DIRS} " )
256256endif ()
257257
258+ if (UMF_BUILD_LEVEL_ZERO_PROVIDER)
259+ set (LEVEL_ZERO_LIBRARY ze_loader)
260+
261+ add_library (LevelZeroLoader INTERFACE )
262+ get_filename_component (LEVEL_ZERO_LIBRARY_SRC "${LEVEL_ZERO_LIBRARY} " DIRECTORY )
263+ message (STATUS "LEVEL_ZERO_LIBRARY_SRC: ${LEVEL_ZERO_LIBRARY_SRC} " )
264+
265+ target_link_directories (LevelZeroLoader
266+ INTERFACE "$<BUILD_INTERFACE:${LEVEL_ZERO_LIBRARY_SRC} >"
267+ )
268+ target_link_libraries (LevelZeroLoader
269+ INTERFACE "${LEVEL_ZERO_LIBRARY} "
270+ )
271+
272+ add_library (LevelZeroLoader-Headers INTERFACE )
273+ target_include_directories (LevelZeroLoader-Headers
274+ INTERFACE "$<BUILD_INTERFACE:${LEVEL_ZERO_INCLUDE_DIRS} >"
275+ )
276+
277+ target_link_libraries (umf PRIVATE
278+ LevelZeroLoader
279+ LevelZeroLoader-Headers
280+ )
281+
282+ target_include_directories (umf PRIVATE
283+ LevelZeroLoader-Headers
284+ )
285+ endif ()
286+
258287# Fetch CUDA only if needed i.e.: if building CUDA provider is ON and CUDA
259288# headers are not provided by the user (via setting UMF_CUDA_INCLUDE_DIR).
260289if (UMF_BUILD_CUDA_PROVIDER AND (NOT UMF_CUDA_INCLUDE_DIR))
You can’t perform that action at this time.
0 commit comments