Move dynutil/h to common/h; move common/h to common/src. Update CMakeLists.txt
[dyninst.git] / proccontrol / CMakeLists.txt
1 # CMake configuration for proccontrol directory
2
3 include_directories (
4     ${PROJECT_SOURCE_DIR}/proccontrol/src
5   )
6
7 set (SRC_LIST
8      src/event.C 
9      src/generator.C 
10      src/handler.C 
11      src/mailbox.C 
12      src/process.C 
13      src/pcerrors.C 
14      src/procpool.C 
15      src/irpc.C 
16      src/response.C 
17      src/int_thread_db.C 
18      src/memcache.C 
19      src/sysv.C 
20      src/x86_process.C 
21      src/ppc_process.C 
22      src/mmapalloc.C 
23      src/procset.C 
24      src/processplat.C 
25      src/loadLibrary/injector.C 
26      src/loadLibrary/codegen.C 
27      src/loadLibrary/codegen-ppc.C 
28      src/loadLibrary/codegen-x86.C
29  )
30
31 if (PLATFORM MATCHES freebsd)
32 set (SRC_LIST ${SRC_LIST}
33      src/freebsd.C
34      src/unix.C
35      src/notify_pipe.C
36      ../common/src/dthread-unix.C
37      src/loadLibrary/codegen-freebsd.C
38   )
39 elseif (PLATFORM MATCHES linux)
40 set (SRC_LIST ${SRC_LIST}
41      src/linux.C
42      src/unix.C
43      src/notify_pipe.C
44      ../common/src/dthread-unix.C
45      src/loadLibrary/codegen-linux.C
46   )
47 elseif (PLATFORM MATCHES bgq)
48 set (SRC_LIST ${SRC_LIST}
49      src/bluegeneq.C
50      src/bgq-messages.C
51      src/notify_pipe.C
52      ../common/src/dthread-unix.C
53      src/loadLibrary/codegen-linux.C
54   )
55 elseif (PLATFORM MATCHES cnl)
56 set (SRC_LIST ${SRC_LIST}
57      src/linux.C
58      src/unix.C
59      src/notify_pipe.C
60      ../common/src/dthread-unix.C
61      src/loadLibrary/codegen-stub.C
62   )
63 elseif (PLATFORM MATCHES windows)
64 endif()
65
66 add_library (pcontrol ${SRC_LIST})
67 target_link_libraries(pcontrol common)
68
69 if (UNIX)
70 target_link_libraries(pcontrol dynElf)
71 target_link_libraries(pcontrol symLite)
72 endif()
73
74 FILE (GLOB headers "h/*.h")
75 set_target_properties (pcontrol PROPERTIES PUBLIC_HEADER "${headers}")
76
77 INSTALL (TARGETS pcontrol
78         EXPORT dyninst
79         LIBRARY DESTINATION ${INSTALL_LIB_DIR}
80         PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})