CMake fixes for building/installing components separately.
[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/StackTamperVisitor.C
27         src/dominator.C
28         src/LoopAnalyzer.C
29         src/Loop.C
30         src/LoopTreeNode.C
31         ../dataflowAPI/src/ABI.C 
32         ../dataflowAPI/src/Absloc.C 
33         ../dataflowAPI/src/AbslocInterface.C 
34         ../dataflowAPI/src/convertOpcodes.C 
35         ../dataflowAPI/src/debug_dataflow.C 
36         ../dataflowAPI/src/ExpressionConversionVisitor.C 
37         ../dataflowAPI/src/InstructionCache.C 
38         ../dataflowAPI/src/liveness.C 
39         ../dataflowAPI/src/RegisterMap.C 
40         ../dataflowAPI/src/RoseImpl.C 
41         ../dataflowAPI/src/RoseInsnFactory.C 
42         ../dataflowAPI/src/slicing.C 
43         ../dataflowAPI/src/stackanalysis.C 
44         ../dataflowAPI/src/SymbolicExpansion.C 
45         ../dataflowAPI/src/SymEval.C 
46         ../dataflowAPI/src/SymEvalPolicy.C 
47         ../dataflowAPI/src/templates.C 
48         ../dataflowAPI/src/Visitors.C 
49     )
50
51 if (LIGHTWEIGHT_SYMTAB)
52 set (SRC_LIST ${SRC_LIST}
53     src/SymLiteCodeSource.C
54 )
55 else()
56 set (SRC_LIST ${SRC_LIST}
57     src/SymtabCodeSource.C
58 )
59 endif()
60
61 if (PLATFORM MATCHES amd64 OR PLATFORM MATCHES i386 OR PLATFORM
62 MATCHES x86_64)
63 set (SRC_LIST ${SRC_LIST}
64      src/InstructionSource-x86.C
65      src/IA_x86.C
66 )
67 elseif (PLATFORM MATCHES ppc)
68 set (SRC_LIST ${SRC_LIST}
69      src/InstructionSource-power.C
70      src/IA_power.C
71 )
72 endif()
73
74 if (ENABLE_PARSE_API_GRAPHS)
75 set (SRC_LIST ${SRC_LIST}
76      src/GraphAdapter.C
77     )
78 endif()
79
80 SET_SOURCE_FILES_PROPERTIES(${SRC_LIST} PROPERTIES LANGUAGE CXX)
81
82 ADD_DEFINITIONS(-DPARSER_LIB)
83 ADD_DEFINITIONS(-DDATAFLOW_LIB)
84
85 dyninst_library(parseAPI common instructionAPI ${SYMREADER})
86
87 FILE (GLOB headers "h/*.h")
88 FILE (GLOB dataflowheaders "../dataflowAPI/h/*.h")
89 set_target_properties (parseAPI PROPERTIES PUBLIC_HEADER "${headers};${dataflowheaders}")
90 if(${ENABLE_STATIC_LIBS})
91   set_target_properties (parseAPI_static PROPERTIES PUBLIC_HEADER "${headers};${dataflowheaders}")
92 endif()
93