Move advanced build instructions and FAQ to wiki
[dyninst.git] / examples / CMakeLists.txt
1
2
3 add_executable(unstrip unstrip.dir/unstrip.C
4                        unstrip.dir/util.C
5                        unstrip.dir/types.C
6                        unstrip.dir/semanticDescriptor.C
7                        unstrip.dir/database.C
8                        unstrip.dir/fingerprint.C
9                        unstrip.dir/callback.C)
10 add_dependencies(unstrip parseAPI symtabAPI instructionAPI common)
11 target_link_libraries(unstrip parseAPI symtabAPI instructionAPI common dynDwarf dynElf ${Boost_LIBRARIES})
12
13 add_executable(codeCoverage codeCoverage.dir/codeCoverage.C)
14 add_dependencies(codeCoverage dyninstAPI patchAPI parseAPI symtabAPI instructionAPI pcontrol common stackwalk dynDwarf dynElf)
15 target_link_libraries(codeCoverage dyninstAPI patchAPI parseAPI symtabAPI instructionAPI pcontrol common stackwalk dynDwarf dynElf ${Boost_LIBRARIES})
16
17 add_library(Inst SHARED codeCoverage.dir/libInst.C)
18 if(TARGET TBB)
19     add_dependencies(Inst TBB)
20 endif()
21
22 add_executable(cfg_to_dot ../parseAPI/doc/example.cc)
23 add_dependencies(cfg_to_dot parseAPI symtabAPI instructionAPI common dynDwarf dynElf)
24 target_link_libraries(cfg_to_dot parseAPI symtabAPI instructionAPI common dynDwarf dynElf ${Boost_LIBRARIES})
25 #add_executable(retee)
26
27 if (USE_OpenMP MATCHES "ON")
28 set_target_properties (unstrip PROPERTIES LINK_FLAGS "-fopenmp")
29 set_target_properties (codeCoverage PROPERTIES LINK_FLAGS "-fopenmp")
30 set_target_properties (cfg_to_dot PROPERTIES LINK_FLAGS "-fopenmp")
31 endif()
32
33
34 install (TARGETS cfg_to_dot unstrip codeCoverage Inst
35         RUNTIME DESTINATION ${INSTALL_BIN_DIR}
36         LIBRARY DESTINATION ${INSTALL_LIB_DIR}
37         ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
38         PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR}
39 )
40
41 install (
42         FILES unstrip.dir/ddb.db unstrip.dir/params.db unstrip.dir/unistd.db DESTINATION ${INSTALL_BIN_DIR}
43 )