Deleted the old code block
[dyninst.git] / symtabAPI / CMakeLists.txt
1 # CMake configuration for symtabAPI directory
2
3 include_directories (
4   src
5   h
6   ${PROJECT_SOURCE_DIR}/dwarf/h
7   ${PROJECT_SOURCE_DIR}/elf/h
8   )
9
10 if(NOT WIN32)
11   include_directories(${PROJECT_SOURCE_DIR}/common/src)
12 endif()
13
14
15
16 set (SRC_LIST
17                 src/Object.C 
18                 src/Aggregate.C 
19                 src/Function.C 
20                 src/Variable.C 
21                 src/Symbol.C 
22                 src/LineInformation.C 
23                 src/Symtab.C 
24                 src/Symtab-edit.C 
25                 src/Symtab-lookup.C 
26                 src/Symtab-deprecated.C 
27                 src/Module.C 
28                 src/Region.C 
29                 src/Collections.C 
30                 src/Type.C 
31                 src/AddrLookup.C 
32                 src/annotations.C 
33                 src/debug.C 
34                 src/SymtabReader.C 
35   )
36
37 if (PLATFORM MATCHES freebsd OR 
38     PLATFORM MATCHES linux OR 
39     PLATFORM MATCHES bgq OR
40     PLATFORM MATCHES cnl)
41
42 set (SRC_LIST ${SRC_LIST}
43     src/Object-elf.C 
44     src/Archive.C 
45     src/Archive-elf.C 
46     src/parseDwarf.C
47         src/parseStab.C
48         src/LinkMap.C
49         src/emitElf.C
50     src/emitElfStatic.C
51     src/dwarfWalker.C
52 )
53
54 if (PLATFORM MATCHES x86_64 OR PLATFORM MATCHES amd64)
55 set (SRC_LIST ${SRC_LIST}
56     src/emitElfStatic-x86.C
57     src/relocationEntry-elf-x86.C
58     )
59 elseif (PLATFORM MATCHES i386)
60 set (SRC_LIST ${SRC_LIST}
61     src/emitElfStatic-x86.C
62     src/relocationEntry-elf-x86.C
63     )
64 elseif (PLATFORM MATCHES ppc32)
65 set (SRC_LIST ${SRC_LIST}
66     src/emitElfStatic-ppc32.C 
67     src/relocationEntry-elf-ppc32.C
68     )
69 elseif (PLATFORM MATCHES ppc64)
70 set (SRC_LIST ${SRC_LIST}
71     src/emitElfStatic-ppc64.C
72     src/relocationEntry-elf-ppc64.C
73     )
74 elseif (PLATFORM MATCHES aarch64)
75 set (SRC_LIST ${SRC_LIST}
76     src/emitElfStatic-aarch64.C
77     src/relocationEntry-elf-aarch64.C
78     )
79 else (TRUE)
80 set (SRC_LIST ${SRC_LIST}
81     src/emitElfStatic-stub.C
82     src/relocationEntry-stub.C
83     )
84 endif()
85 endif()
86
87
88 if (PLATFORM MATCHES nt)
89 set (SRC_LIST ${SRC_LIST}
90     src/Object-nt.C
91         src/emitWin.C
92         src/relocationEntry-stub.C
93 )
94 endif()
95
96 SET_SOURCE_FILES_PROPERTIES(${SRC_LIST} PROPERTIES LANGUAGE CXX)
97
98 ADD_DEFINITIONS(-DSYMTAB_LIB)
99
100 set (DEPS common)
101
102 if(UNIX)
103   set (DEPS ${DEPS}
104     dynElf ${LIBELF_LIBRARIES}
105     dynDwarf ${LIBDWARF_LIBRARIES}
106     )
107 else()
108   set (DEPS ${DEPS} dbghelp)
109 endif()
110
111 dyninst_library(symtabAPI ${DEPS})
112
113 if (USE_COTIRE)
114     cotire(symtabAPI)
115 endif()