-
Notifications
You must be signed in to change notification settings - Fork 467
/
FindLibLLDB.cmake
122 lines (120 loc) · 4.88 KB
/
FindLibLLDB.cmake
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
if (UNIX)
macro( FIND_LLDB_OFFICIAL )
## Locate the official packages
find_library(LIBLLDB_T
NAMES liblldb.so liblldb.so.1
HINTS
/usr/lib
/usr/local/lib
/usr/lib/llvm-20/lib
/usr/lib/llvm-19/lib
/usr/lib/llvm-18/lib
/usr/lib/llvm-17/lib
/usr/lib/llvm-16/lib
/usr/lib/llvm-15/lib
/usr/lib/llvm-14/lib
/usr/lib/llvm-13/lib
/usr/lib/llvm-12/lib
/usr/lib/llvm-11/lib
/usr/lib/llvm-10/lib
/usr/lib/llvm-9/lib
/usr/lib/llvm-8/lib
/usr/lib/llvm-7/lib
/usr/lib/llvm-6/lib
/usr/lib/llvm-20.0/lib
/usr/lib/llvm-19.0/lib
/usr/lib/llvm-18.0/lib
/usr/lib/llvm-17.0/lib
/usr/lib/llvm-16.0/lib
/usr/lib/llvm-15.0/lib
/usr/lib/llvm-14.0/lib
/usr/lib/llvm-13.0/lib
/usr/lib/llvm-12.0/lib
/usr/lib/llvm-11.0/lib
/usr/lib/llvm-10.0/lib
/usr/lib/llvm-9.0/lib
/usr/lib/llvm-8.0/lib
/usr/lib/llvm-7.0/lib
/usr/lib/llvm-6.0/lib
/usr/lib/llvm-5.0/lib
/usr/lib/llvm-4.2/lib
/usr/lib/llvm-4.1/lib
/usr/lib/llvm-4.0/lib
/usr/lib/llvm-3.9/lib
/usr/lib/llvm-3.8/lib
#/usr/lib/llvm-3.7/lib
/usr/lib/llvm-3.6/lib
/usr/lib/llvm-3.5/lib
/usr/lib/llvm-3.4/lib
/usr/lib/llvm-3.3/lib
# For fedora
/usr/lib/llvm
/usr/lib64/llvm
${CMAKE_INSTALL_LIBDIR})
find_path(LIBLLDB_INCLUDE_T NAMES lldb/API/SBDebugger.h
HINTS
/usr/lib/llvm-20/include
/usr/lib/llvm-19/include
/usr/lib/llvm-18/include
/usr/lib/llvm-17/include
/usr/lib/llvm-16/include
/usr/lib/llvm-15/include
/usr/lib/llvm-14/include
/usr/lib/llvm-13/include
/usr/lib/llvm-12/include
/usr/lib/llvm-11/include
/usr/lib/llvm-10/include
/usr/lib/llvm-9/include
/usr/lib/llvm-8/include
/usr/lib/llvm-20.0/include
/usr/lib/llvm-19.0/include
/usr/lib/llvm-18.0/include
/usr/lib/llvm-17.0/include
/usr/lib/llvm-16.0/include
/usr/lib/llvm-15.0/include
/usr/lib/llvm-14.0/include
/usr/lib/llvm-13.0/include
/usr/lib/llvm-12.0/include
/usr/lib/llvm-11.0/include
/usr/lib/llvm-10.0/include
/usr/lib/llvm-9.0/include
/usr/lib/llvm-8.0/include
/usr/lib/llvm-7.0/include
/usr/lib/llvm-6.0/include
/usr/lib/llvm-5.0/include
/usr/lib/llvm-4.2/include
/usr/lib/llvm-4.1/include
/usr/lib/llvm-4.0/include
/usr/lib/llvm-3.9/include
/usr/lib/llvm-3.8/include
#/usr/lib/llvm-3.7/include
/usr/lib/llvm-3.6/include
/usr/lib/llvm-3.5/include
/usr/lib/llvm-3.4/include
/usr/lib/llvm-3.3/include
/usr/include/llvm-4.2
/usr/include/llvm-4.1
/usr/include/llvm-4.0
/usr/include/llvm-3.9
/usr/include/llvm-3.8
#/usr/include/llvm-3.7
/usr/include/llvm-3.6
/usr/include/llvm-3.5
/usr/include/llvm-3.4
/usr/include/llvm-3.3
/usr/include/llvm
/usr/local/include
# For fedora
/usr/include
)
if ( LIBLLDB_T STREQUAL "LIBLLDB_T-NOTFOUND" OR LIBLLDB_INCLUDE_T STREQUAL "LIBLLDB_INCLUDE_T-NOTFOUND" )
set(LIBLLDB "LIBLLDB-NOTFOUND")
set(LIBLLDB_INCLUDE "LIBLLDB_INCLUDE-NOTFOUND")
set( LLDB_OFFICIAL_FOUND 0 )
else()
set(LIBLLDB ${LIBLLDB_T})
set(LIBLLDB_INCLUDE ${LIBLLDB_INCLUDE_T})
set( LLDB_OFFICIAL_FOUND 1 )
endif()
endmacro()
endif()