Manually specify RT lib .S files to be built with gcc.
[dyninst.git] / CMakeLists.txt
1 cmake_minimum_required (VERSION 2.6)
2 project (Dyninst)
3
4 set (SOVERSION "8.1")
5 set (LIBVERSION "8.1.1")
6
7
8 set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules")
9 include (cmake/platform.cmake)
10 include (cmake/packages.cmake)
11 include (cmake/cap_arch_def.cmake)
12 include (cmake/c++11.cmake)
13 include (cmake/warnings.cmake)
14 include (cmake/options.cmake)
15
16 set (BUILD_SHARED_LIBS ON)
17
18 include_directories (
19                     ${PROJECT_SOURCE_DIR}
20                     ${PROJECT_SOURCE_DIR}/external
21   )
22
23 set (HEADER_DIRS dataflowAPI
24                  dwarf
25                  dyninstAPI
26                  dyninstAPI_RT
27                  dynutil
28                  elf
29                  instructionAPI
30                  parseAPI
31                  patchAPI
32                  proccontrol
33                  stackwalk
34                  symlite
35                  symtabAPI
36     )
37
38 foreach (dir ${HEADER_DIRS})
39   include_directories ( ${PROJECT_SOURCE_DIR}/${dir}/h )
40 endforeach()
41
42 # Component time
43 add_subdirectory (dynutil)
44 add_subdirectory (common)
45 add_subdirectory (elf)
46 add_subdirectory (dwarf)
47 add_subdirectory (instructionAPI)
48 add_subdirectory (symtabAPI)
49 add_subdirectory (symlite)
50 add_subdirectory (parseAPI)
51 add_subdirectory (patchAPI)
52 add_subdirectory (proccontrol)
53 add_subdirectory (stackwalk)
54 add_subdirectory (dyninstAPI)
55 add_subdirectory (dyninstAPI_RT)
56
57 SET_TARGET_PROPERTIES (
58    common dynElf dynDwarf instructionAPI symtabAPI symLite parseAPI
59    patchAPI pcontrol stackwalker dyninstAPI dyninstAPI_RT
60    PROPERTIES
61      SOVERSION ${SOVERSION}
62      VERSION ${LIBVERSION}
63 )
64
65 # RTlib properties are set in its CMakeLists.txt; it seems
66 # like multiple set_target_properties calls override instead
67 # of accumulating
68
69 add_subdirectory(testsuite/${PLATFORM})