More CMake work
[dyninst.git] / stackwalk / 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/frame.C 
9     src/framestepper.C 
10     src/swk_errors.C 
11     src/symlookup.C 
12     src/walker.C 
13     src/procstate.C 
14     src/steppergroup.C 
15     src/libstate.C 
16     src/sw_c.C 
17     src/sw_pcontrol.C  
18 )
19
20 if (SW_ANALYSIS_STEPPER)
21 set (SRC_LIST ${SRC_LIST}
22      src/analysis_stepper.C
23      src/callchecker-IAPI.C
24   )
25 else ()
26 set (SRC_LIST ${SRC_LIST}
27      src/callchecker.C
28   )
29 endif()
30
31
32 add_library (stackwalker ${SRC_LIST})
33
34 target_link_libraries (stackwalker pcontrol)
35
36 if (UNIX)
37 target_link_libraries (stackwalker ${LIBELF_LIBRARIES})
38 target_link_libraries (stackwalker ${LIBDWARF_LIBRARIES})
39 endif()
40
41 if (LIGHTWEIGHT_SYMTAB)
42 target_link_libraries(stackwalker symLite)
43 else()
44 target_link_libraries(stackwalker symtabAPI)
45 endif()
46
47 if (SW_ANALYSIS_STEPPER)
48 target_link_libraries(stackwalker parseAPI)
49 endif()
50
51 INSTALL (DIRECTORY h/ DESTINATION include FILES_MATCHING PATTERN "*.h")
52 INSTALL (TARGETS stackwalker
53         LIBRARY DESTINATION lib)