1 2if(BUILD_GRAPHICS_DETECTOR) 3 find_package(Protobuf REQUIRED) 4 find_package(Threads REQUIRED) 5 6 protobuf_generate_cpp( 7 LIBGFXSTREAM_GRAPHICS_DETECTOR_SRCS 8 LIBGFXSTREAM_GRAPHICS_DETECTOR_HDRS 9 GraphicsDetector.proto 10 ) 11 12 add_library( 13 libgfxstream_graphics_detector_proto 14 STATIC 15 ${LIBGFXSTREAM_GRAPHICS_DETECTOR_SRCS} 16 ) 17 18 target_link_libraries( 19 libgfxstream_graphics_detector_proto 20 PUBLIC 21 libprotobuf.a 22 ) 23 24 target_include_directories( 25 libgfxstream_graphics_detector_proto 26 PUBLIC 27 $<TARGET_PROPERTY:libgfxstream_graphics_detector_proto,BINARY_DIR> 28 ) 29 30 set_property( 31 TARGET 32 libgfxstream_graphics_detector_proto 33 PROPERTY 34 CXX_STANDARD 17 35 ) 36 37 add_executable( 38 gfxstream_graphics_detector 39 DetectGraphics.cpp 40 Egl.cpp 41 Gles.cpp 42 Image.cpp 43 Lib.cpp 44 GraphicsDetector.cpp 45 GraphicsDetectorGl.cpp 46 GraphicsDetectorVk.cpp 47 GraphicsDetectorVkExternalMemoryHost.cpp 48 GraphicsDetectorVkPrecisionQualifiersOnYuvSamplers.cpp 49 Subprocess.cpp 50 Vulkan.cpp 51 ) 52 53 target_include_directories( 54 gfxstream_graphics_detector 55 PRIVATE 56 . 57 ) 58 59 target_link_libraries( 60 gfxstream_graphics_detector 61 PRIVATE 62 libgfxstream_graphics_detector_proto 63 gfxstream-gl-host-common.headers 64 gfxstream_vulkan_headers 65 Threads::Threads 66 ${CMAKE_DL_LIBS} 67 ) 68 69 set_property( 70 TARGET 71 gfxstream_graphics_detector 72 PROPERTY 73 CXX_STANDARD 17 74 ) 75 76endif()