xref: /aosp_15_r20/external/intel-media-driver/media_driver/linux/ult/libdrm_mock/CMakeLists.txt (revision ba62d9d3abf0e404f2022b4cd7a85e107f48596f)
1# Copyright (c) 2018-2022, 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.
20cmake_minimum_required(VERSION 2.8)
21
22project(libdrm_mock)
23
24include_directories(../../common/os ${MEDIA_SOFTLET}/linux/common/os/i915/include ../inc)
25aux_source_directory(. SOURCES)
26
27if (MEDIA_EXT)
28    list(REMOVE_ITEM SOURCES ./mos_bufmgr_mock.c)
29    list(REMOVE_ITEM SOURCES ./libdrm_mock/xf86drm_mock.c)
30    set(SOURCES
31        ${MEDIA_EXT_ULT}/linux/mock/libdrm_mock/mos_bufmgr_mock.c
32        ${MEDIA_EXT_ULT}/linux/mock/libdrm_mock/xf86drm_mock.c
33)
34endif ()
35
36set(SOURCES
37    ${SOURCES}
38    ${MEDIA_SOFTLET}/linux/common/os/mos_vma.c
39)
40
41set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE "CXX")
42add_library(drm_mock SHARED ${SOURCES})
43target_include_directories(drm_mock BEFORE PRIVATE
44${COMMON_CP_DIRECTORIES_}
45${SOFTLET_MOS_PREPEND_INCLUDE_DIRS_}
46${MOS_PUBLIC_INCLUDE_DIRS_}     ${SOFTLET_MOS_PUBLIC_INCLUDE_DIRS_}
47${COMMON_PRIVATE_INCLUDE_DIRS_} ${SOFTLET_COMMON_PRIVATE_INCLUDE_DIRS_}
48)
49set_target_properties(drm_mock PROPERTIES VERSION 2.4.0 SOVERSION 2)
50