More CMake work
[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/IA_x86.C
52 )
53 elseif (PLATFORM MATCHES ppc)
54 set (SRC_LIST ${SRC_LIST}
55      src/IA_power.C
56 )
57 endif()
58
59 if (ENABLE_PARSE_API_GRAPHS)
60 set (SRC_LIST ${SRC_LIST}
61      src/GraphAdapter.C
62     )
63 endif()
64
65 if (NOT ${LIGHTWEIGHT_SYMTAB})
66 set (SRC_LIST ${SRC_LIST}
67     src/SymtabCodeSource.C
68     )
69 endif()
70
71
72 add_library (parseAPI ${SRC_LIST})
73 target_link_libraries(parseAPI common)
74 target_link_libraries(parseAPI instructionAPI)
75
76 if (UNIX)
77 target_link_libraries(parseAPI ${LIBELF_LIBRARIES})
78 endif()
79
80 if (${LIGHTWEIGHT_SYMTAB})
81 target_link_libraries(parseAPI symLite)
82 else()
83 target_link_libraries(parseAPI symtabAPI)
84 endif()
85
86
87
88 INSTALL (DIRECTORY h/ DESTINATION include FILES_MATCHING PATTERN "*.h")
89 INSTALL (TARGETS parseAPI
90         LIBRARY DESTINATION lib)