summaryrefslogtreecommitdiffstats
path: root/lldb/tools/intel-features/intel-pt/CMakeLists.txt
blob: 9750ed83ce2d7cee0414283b1c707f9230808ff7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
if (NOT LIBIPT_INCLUDE_PATH)
  message (FATAL_ERROR "libipt include path not provided")
endif()

if (NOT EXISTS "${LIBIPT_INCLUDE_PATH}")
  message (FATAL_ERROR "invalid libipt include path provided")
endif()
include_directories(${LIBIPT_INCLUDE_PATH})

if (NOT LIBIPT_LIBRARY_PATH)
  find_library(LIBIPT_LIBRARY ipt)
else()
  if (NOT EXISTS "${LIBIPT_LIBRARY_PATH}")
    message (FATAL_ERROR "invalid libipt library path provided")
  endif()
  find_library(LIBIPT_LIBRARY ipt PATHS ${LIBIPT_LIBRARY_PATH})
endif()

if (NOT LIBIPT_LIBRARY)
  message (FATAL_ERROR "libipt library not found")
endif()

add_lldb_library(lldbIntelPT
  PTDecoder.cpp
  Decoder.cpp
  cli-wrapper-pt.cpp

  LINK_LIBS
    ${LIBIPT_LIBRARY}
    liblldb
  )
OpenPOWER on IntegriCloud