Fix up CMake export config file ; remove codeCoverage ; remove testsuite
[dyninst.git] / parseAPI / CMakeLists.txt
1 # CMake configuration for parseAPI directory
2
3 include_directories (
4     ${PROJECT_SOURCE_DIR}/parseAPI/src
5   )
6
7
8 set (SRC_LIST
9         src/ParserDetails.C 
10         src/Parser.C 
11         src/CFGFactory.C 
12         src/Function.C 
13         src/Block.C 
14         src/CodeObject.C 
15         src/debug_parse.C 
16         src/CodeSource.C 
17         src/ParseData.C
18         src/InstructionAdapter.C
19         src/Parser-speculative.C
20         src/ParseCallback.C 
21         src/IA_IAPI.C
22         src/IA_x86Details.C 
23         src/IA_powerDetails.C 
24         src/IA_platformDetailsFactory.C 
25         src/CFGModifier.C
26         src/SymLiteCodeSource.C
27         src/StackTamperVisitor.C
28         ../dataflowAPI/src/ABI.C 
29         ../dataflowAPI/src/Absloc.C 
30         ../dataflowAPI/src/AbslocInterface.C 
31         ../dataflowAPI/src/convertOpcodes.C 
32         ../dataflowAPI/src/debug_dataflow.C 
33         ../dataflowAPI/src/ExpressionConversionVisitor.C 
34         ../dataflowAPI/src/InstructionCache.C 
35         ../dataflowAPI/src/liveness.C 
36         ../dataflowAPI/src/RegisterMap.C 
37         ../dataflowAPI/src/RoseImpl.C 
38         ../dataflowAPI/src/RoseInsnFactory.C 
39         ../dataflowAPI/src/slicing.C 
40         ../dataflowAPI/src/stackanalysis.C 
41         ../dataflowAPI/src/SymbolicExpansion.C 
42         ../dataflowAPI/src/SymEval.C 
43         ../dataflowAPI/src/SymEvalPolicy.C 
44         ../dataflowAPI/src/templates.C 
45         ../dataflowAPI/src/Visitors.C 
46     )
47
48 if (PLATFORM MATCHES amd64 OR PLATFORM MATCHES i386 OR PLATFORM
49 MATCHES x86_64)
50 set (SRC_LIST ${SRC_LIST}
51      src/InstructionSource-x86.C
52      src/IA_x86.C
53 )
54 elseif (PLATFORM MATCHES ppc)
55 set (SRC_LIST ${SRC_LIST}
56      src/InstructionSource-power.C
57      src/IA_power.C
58 )
59 endif()
60
61 if (ENABLE_PARSE_API_GRAPHS)
62 set (SRC_LIST ${SRC_LIST}
63      src/GraphAdapter.C
64     )
65 endif()
66
67 if (NOT ${LIGHTWEIGHT_SYMTAB})
68 set (SRC_LIST ${SRC_LIST}
69     src/SymtabCodeSource.C
70     )
71 endif()
72
73
74 add_library (parseAPI ${SRC_LIST})
75 target_link_libraries(parseAPI common)
76 target_link_libraries(parseAPI instructionAPI)
77
78 if (UNIX)
79 target_link_libraries(parseAPI ${LIBELF_LIBRARIES})
80 endif()
81
82 if (${LIGHTWEIGHT_SYMTAB})
83 target_link_libraries(parseAPI symLite)
84 else()
85 target_link_libraries(parseAPI symtabAPI)
86 endif()
87
88 FILE (GLOB headers "h/*.h")
89 set_target_properties (parseAPI PROPERTIES PUBLIC_HEADER "${headers}")
90
91
92 INSTALL (TARGETS parseAPI
93         EXPORT DyninstTargets
94         LIBRARY DESTINATION ${INSTALL_LIB_DIR}
95         PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})