Add static targets
[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_libraries (dynDwarf ${LIBDWARF_LIBRARIES})
22
23 FILE (GLOB headers "h/*.h")
24 set_target_properties (dynDwarf dynDwarf_static PROPERTIES PUBLIC_HEADER "${headers}")
25
26 INSTALL (TARGETS dynDwarf dynDwarf_static
27         EXPORT DyninstTargets
28         RUNTIME DESTINATION ${INSTALL_LIB_DIR}
29         LIBRARY DESTINATION ${INSTALL_LIB_DIR}
30         ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
31         PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})
32