dynC: Fix soname and exports
[dyninst.git] / dynC_API / CMakeLists.txt
1
2 file(GLOB SRC_LIST "src/*.C")
3
4 include_directories(h src ../dyninstAPI/src)
5
6 set_source_files_properties(${SRC_LIST} PROPERTIES LANGUAGE CXX)
7 add_definitions(-DDYNC_EXPORTS)
8 add_library(dynC_API ${SRC_LIST})
9 add_library(dynC_API_static STATIC ${SRC_LIST})
10 file (GLOB headers "h/*.h")
11
12 set_target_properties(dynC_API dynC_API_static PROPERTIES PUBLIC_HEADER "${headers}")
13
14 target_link_private_libraries (dynC_API dyninstAPI)
15
16 install(TARGETS dynC_API dynC_API_static
17                 EXPORT DyninstTargets
18                 RUNTIME DESTINATION ${INSTALL_LIB_DIR}
19                 LIBRARY DESTINATION ${INSTALL_LIB_DIR}          
20                 ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
21                 PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})
22