Clean up library linkage
[dyninst.git] / instructionAPI / CMakeLists.txt
1 # CMake configuration for instructionAPI directory
2
3 include_directories (
4     ${PROJECT_SOURCE_DIR}/instructionAPI/src
5   )
6
7
8 set (SRC_LIST
9      src/Instruction.C 
10      src/InstructionAST.C 
11      src/Operation.C 
12      src/Operand.C 
13      src/Register.C 
14      src/Expression.C 
15      src/BinaryFunction.C 
16      src/InstructionCategories.C 
17      src/Immediate.C 
18      src/InstructionDecoder.C 
19      src/InstructionDecoder-x86.C
20      src/InstructionDecoder-power.C 
21      src/InstructionDecoderImpl.C
22   )
23 SET_SOURCE_FILES_PROPERTIES(${SRC_LIST} PROPERTIES LANGUAGE CXX)
24
25 ADD_DEFINITIONS(-DINSTRUCTION_LIB)
26
27 add_library (instructionAPI ${SRC_LIST})
28 add_library (instructionAPI_static STATIC ${SRC_LIST})
29 target_link_private_libraries (instructionAPI common)
30 FILE (GLOB headers "h/*.h")
31 set_target_properties (instructionAPI instructionAPI_static PROPERTIES PUBLIC_HEADER "${headers}")
32
33 INSTALL (TARGETS instructionAPI instructionAPI_static
34         EXPORT DyninstTargets
35         RUNTIME DESTINATION ${INSTALL_LIB_DIR}
36         LIBRARY DESTINATION ${INSTALL_LIB_DIR}
37         ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
38         PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})