1if (NOT LIBIPT_INCLUDE_PATH) 2 message (FATAL_ERROR "libipt include path not provided") 3endif() 4 5if (NOT EXISTS "${LIBIPT_INCLUDE_PATH}") 6 message (FATAL_ERROR "invalid libipt include path provided") 7endif() 8include_directories(${LIBIPT_INCLUDE_PATH}) 9 10find_library(LIBIPT_LIBRARY ipt PATHS ${LIBIPT_LIBRARY_PATH} REQUIRED) 11 12lldb_tablegen(TraceIntelPTCommandOptions.inc -gen-lldb-option-defs 13 SOURCE TraceIntelPTOptions.td 14 TARGET TraceIntelPTOptionsGen) 15 16lldb_tablegen(TraceIntelPTProperties.inc -gen-lldb-property-defs 17 SOURCE TraceIntelPTProperties.td 18 TARGET TraceIntelPTPropertiesGen) 19 20lldb_tablegen(TraceIntelPTPropertiesEnum.inc -gen-lldb-property-enum-defs 21 SOURCE TraceIntelPTProperties.td 22 TARGET TraceIntelPTPropertiesEnumGen) 23 24add_lldb_library(lldbPluginTraceIntelPT PLUGIN 25 CommandObjectTraceStartIntelPT.cpp 26 DecodedThread.cpp 27 TaskTimer.cpp 28 LibiptDecoder.cpp 29 PerfContextSwitchDecoder.cpp 30 ThreadDecoder.cpp 31 TraceCursorIntelPT.cpp 32 TraceIntelPT.cpp 33 TraceIntelPTJSONStructs.cpp 34 TraceIntelPTMultiCpuDecoder.cpp 35 TraceIntelPTBundleLoader.cpp 36 TraceIntelPTBundleSaver.cpp 37 38 LINK_LIBS 39 lldbCore 40 lldbSymbol 41 lldbTarget 42 lldbPluginTraceCommon 43 ${LIBIPT_LIBRARY} 44 LINK_COMPONENTS 45 Support 46 ) 47 48 49add_dependencies(lldbPluginTraceIntelPT 50 TraceIntelPTOptionsGen 51 TraceIntelPTPropertiesGen 52 TraceIntelPTPropertiesEnumGen) 53