1add_subdirectory(cereal)
2add_subdirectory(emulated_textures)
3
4add_library(gfxstream-vulkan-server
5            BorrowedImageVk.cpp
6            BufferVk.cpp
7            ColorBufferVk.cpp
8            CompositorVk.cpp
9            DeviceOpTracker.cpp
10            DisplayVk.cpp
11            DisplaySurfaceVk.cpp
12            DebugUtilsHelper.cpp
13            PostWorkerVk.cpp
14            SwapChainStateVk.cpp
15            RenderThreadInfoVk.cpp
16            VkAndroidNativeBuffer.cpp
17            VkCommonOperations.cpp
18            VkDecoder.cpp
19            VkDecoderGlobalState.cpp
20            VkDecoderSnapshot.cpp
21            VkDecoderSnapshotUtils.cpp
22            VkEmulatedPhysicalDeviceMemory.cpp
23            VkFormatUtils.cpp
24            VkReconstruction.cpp
25            VulkanDispatch.cpp
26            VulkanHandleMapping.cpp
27            VulkanStream.cpp
28            vk_util.cpp)
29set_source_files_properties(VkDecoder.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-variable)
30
31target_link_libraries(gfxstream-vulkan-server PUBLIC
32        OpenglRender_vulkan_cereal
33        gfxstream-compressedTextures
34        emulated_textures
35        apigen-codec-common
36        aemu-base.headers
37        gfxstream_features
38        gfxstream-snapshot.headers
39        gfxstream_utils
40        gfxstream_vulkan_headers
41        PRIVATE
42        gfxstream_egl_headers)
43
44if (WIN32)
45target_compile_definitions(gfxstream-vulkan-server PRIVATE -DVK_USE_PLATFORM_WIN32_KHR)
46elseif (APPLE)
47target_compile_definitions(gfxstream-vulkan-server PRIVATE -DVK_USE_PLATFORM_METAL_EXT)
48elseif (QNX)
49target_compile_definitions(gfxstream-vulkan-server PRIVATE -DVK_USE_PLATFORM_SCREEN_QNX)
50endif()
51
52if (NOT MSVC)
53    target_compile_options(gfxstream-vulkan-server PRIVATE -fvisibility=hidden)
54endif()
55target_compile_options(gfxstream-vulkan-server PRIVATE -Wno-unused-value -Wno-return-type -Wno-return-type-c-linkage)
56
57target_include_directories(gfxstream-vulkan-server
58                           PUBLIC
59                           ${GFXSTREAM_REPO_ROOT}/vulkan
60                           ${GFXSTREAM_REPO_ROOT}/vulkan/cereal
61                           PRIVATE
62                           ${GFXSTREAM_REPO_ROOT}
63                           ${GFXSTREAM_REPO_ROOT}/include
64                           ${GFXSTREAM_REPO_ROOT}/host
65                           ${GFXSTREAM_REPO_ROOT}/host/vulkan
66                           ${GFXSTREAM_REPO_ROOT}/host/vulkan/cereal/common
67                           ${GFXSTREAM_REPO_ROOT}/host/apigen-codec-common
68                           ${GFXSTREAM_REPO_ROOT}/third-party/glm/include)
69