modified: cmake/cap_arch_def.cmake
[dyninst.git] / dwarf / CMakeLists.txt
1 # CMake configuration for dynDwarf (dwarf) directory
2
3 if (NOT UNIX)
4   return()
5 endif()
6
7 include_directories (
8   ${PROJECT_SOURCE_DIR}/dwarf/src
9   )
10 add_definitions(-DDYNDWARF_LIB)
11
12 set (SRC_LIST
13      src/dwarfResult.C
14      src/dwarfExprParser.C
15      src/dwarfFrameParser.C
16      src/dwarfHandle.C
17   )
18
19 add_library (dynDwarf ${SRC_LIST})
20 add_library (dynDwarf_static STATIC ${SRC_LIST})
21 target_link_private_libraries (dynDwarf ${LIBDWARF_LIBRARIES})
22 target_link_private_libraries (dynDwarf dynElf)
23 target_link_private_libraries (dynDwarf common)
24
25 FILE (GLOB headers "h/*.h")
26 set_target_properties (dynDwarf dynDwarf_static PROPERTIES PUBLIC_HEADER "${headers}")
27
28 INSTALL (TARGETS dynDwarf dynDwarf_static
29         EXPORT DyninstTargets
30         RUNTIME DESTINATION ${INSTALL_LIB_DIR}
31         LIBRARY DESTINATION ${INSTALL_LIB_DIR}
32         ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
33         PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})
34