CMake fixes for building/installing components separately.
[dyninst.git] / symlite / CMakeLists.txt
1 # CMake configuration for symlite directory
2
3 if (NOT UNIX)
4   return()
5 endif()
6
7 include_directories (
8   src
9   ${PROJECT_SOURCE_DIR}/elf/h
10   )
11
12 set (SRC_LIST
13      src/SymLite-elf.C
14   )
15 add_definitions(-DSYMLITE_LIB)
16
17 add_library (symLite ${SRC_LIST})
18 add_library (symLite_static STATIC ${SRC_LIST})
19 FILE (GLOB headers "h/*.h")
20 set_target_properties (symLite symLite_static PROPERTIES PUBLIC_HEADER "${headers}")
21
22 target_link_private_libraries (symLite common)
23 target_link_private_libraries (symLite dynElf)
24
25 INSTALL (TARGETS symLite symLite_static
26         EXPORT DyninstTargets
27         RUNTIME DESTINATION ${INSTALL_LIB_DIR}
28         LIBRARY DESTINATION ${INSTALL_LIB_DIR}
29         ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
30         PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})
31