-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
77 lines (70 loc) · 1.84 KB
/
CMakeLists.txt
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
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
add_library(hidl-gen-hash SHARED
"Hash.cpp"
)
target_include_directories(hidl-gen-hash PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include_hash/hidl-hash>
$<INSTALL_INTERFACE:include_hash>
)
target_link_libraries(hidl-gen-hash base crypto ssl)
add_subdirectory(utils)
add_library(hidl-gen SHARED
"Annotation.cpp"
"ArrayType.cpp"
"CompoundType.cpp"
"ConstantExpression.cpp"
"DeathRecipientType.cpp"
"DocComment.cpp"
"EnumType.cpp"
"HandleType.cpp"
"HidlTypeAssertion.cpp"
"Interface.cpp"
"Location.cpp"
"MemoryType.cpp"
"Method.cpp"
"NamedType.cpp"
"PointerType.cpp"
"FmqType.cpp"
"RefType.cpp"
"ScalarType.cpp"
"Scope.cpp"
"StringType.cpp"
"Type.cpp"
"TypeDef.cpp"
"VectorType.cpp"
)
target_include_directories(hidl-gen PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include_hash>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/utils/include>
)
target_link_libraries(hidl-gen base hidl-gen-hash hidl-gen-utils)
find_package(BISON)
find_package(FLEX)
BISON_TARGET(hidl-gen_y
"hidl-gen_y.yy" ${CMAKE_CURRENT_BINARY_DIR}/hidl-gen_y.cpp)
FLEX_TARGET(hidl-gen_l
"hidl-gen_l.ll" ${CMAKE_CURRENT_BINARY_DIR}/hidl-gen_l.cpp)
ADD_FLEX_BISON_DEPENDENCY(hidl-gen_l hidl-gen_y)
add_library(hidl-gen-ast SHARED
"Coordinator.cpp"
"generateCpp.cpp"
"generateCppAdapter.cpp"
"generateCppImpl.cpp"
"generateJava.cpp"
"generateVts.cpp"
"hidl-gen_y.yy"
"hidl-gen_y.cpp"
"hidl-gen_l.ll"
"hidl-gen_l.cpp"
"AST.cpp"
)
target_link_libraries(hidl-gen-ast base hidl-gen hidl-gen-hash hidl-gen-utils)
add_executable(hidl-gen-bin
"main.cpp"
)
target_link_libraries(hidl-gen-bin base hidl-gen hidl-gen-ast hidl-gen-hash hidl-gen-utils)
set_target_properties(hidl-gen-bin
PROPERTIES OUTPUT_NAME hidl-gen)