Debian Codegraph @

media_driver/linux/ult/ult_app/CMakeLists.txt

raw ◀ ▶
Source reconstructed at patch state 1 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 # Copyright (c) 2018, Intel Corporation
2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the "Software"),
5 # to deal in the Software without restriction, including without limitation
6 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 # and/or sell copies of the Software, and to permit persons to whom the
8 # Software is furnished to do so, subject to the following conditions:
9 #
10 # The above copyright notice and this permission notice shall be included
11 # in all copies or substantial portions of the Software.
12 #
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
17 # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
18 # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
19 # OTHER DEALINGS IN THE SOFTWARE.
20 cmake_minimum_required(VERSION 3.1)
21
22 project(devult)
23
24 add_subdirectory(googletest)
25
26 set(agnostic_cm_tests ../../../agnostic/ult/cm)
27
28 set(INTERNAL_INC_PATH
29 ../inc
30 ./cm
31 ./googletest/include
32 ./gpu_cmd
33 ${agnostic_cm_tests}
34 ../../../linux/common/cp/shared
35 )
36 include_directories(${INTERNAL_INC_PATH} ${LIBVA_PATH})
37 if (NOT "${BS_DIR_GMMLIB}" STREQUAL "")
38 include_directories(${BS_DIR_GMMLIB}/inc)
39 endif ()
40 if (NOT "${BS_DIR_INC}" STREQUAL "")
41 include_directories(${BS_DIR_INC} ${BS_DIR_INC}/common)
42 endif ()
43
44 aux_source_directory(. SOURCES)
45 aux_source_directory(./cm SOURCES)
46 aux_source_directory(${agnostic_cm_tests} SOURCES)
47 if (ENABLE_NONFREE_KERNELS)
48 aux_source_directory(./gpu_cmd SOURCES)
49 set(SOURCES
50 ${SOURCES}
51 ../../../agnostic/gen9_bxt/hw/vdbox/mhw_vdbox_mfx_hwcmd_g9_bxt.cpp
52 ../../../agnostic/gen9_skl/hw/vdbox/mhw_vdbox_mfx_hwcmd_g9_skl.cpp
53 )
54 else ()
55 set(SOURCES
56 ${SOURCES}
57 ${CMAKE_CURRENT_LIST_DIR}/gpu_cmd/gpu_cmd_factory.cpp
58 )
59 endif ()
60
61 add_executable(devult ${SOURCES})
62 target_link_libraries(devult libgtest libdl.so)
63 target_include_directories(devult BEFORE PRIVATE
64 ${SOFTLET_MOS_PREPEND_INCLUDE_DIRS_}
65 ${MOS_PUBLIC_INCLUDE_DIRS_} ${SOFTLET_MOS_PUBLIC_INCLUDE_DIRS_}
66 ${COMMON_PRIVATE_INCLUDE_DIRS_} ${SOFTLET_COMMON_PRIVATE_INCLUDE_DIRS_}
67 ${VP_PRIVATE_INCLUDE_DIRS_} ${SOFTLET_VP_PRIVATE_INCLUDE_DIRS_}
68 ${COMMON_CP_DIRECTORIES_}
69 ${SOFTLET_DDI_PUBLIC_INCLUDE_DIRS_} ${SOFTLET_MHW_PRIVATE_INCLUDE_DIRS_}
70 )
71 if (DEFINED BYPASS_MEDIA_ULT AND "${BYPASS_MEDIA_ULT}" STREQUAL "yes")
72 # must explictly pass along BYPASS_MEDIA_ULT as yes then could bypass the running of media ult
73 message("-- media -- BYPASS_MEDIA_ULT = ${BYPASS_MEDIA_ULT}")
74 else ()
75 if (ENABLE_NONFREE_KERNELS)
76 add_test(
77 NAME ULT
78 COMMAND env LD_PRELOAD=$<TARGET_FILE:drm_mock> $<TARGET_FILE:devult> ../../../${LIB_NAME}.so
79 )
80 endif ()
81 endif ()