~alan-griffiths/mir/fix-1297100

« back to all changes in this revision

Viewing changes to src/shared/CMakeLists.txt

  • Committer: Tarmac
  • Author(s): Alan Griffiths, Daniel van Vugt, Christopher James Halse Rogers
  • Date: 2014-07-22 20:42:40 UTC
  • mfrom: (1769.2.26 mir2)
  • Revision ID: tarmac-20140722204240-5jozwlzfk4vb8gc5
Change the "shared" library from a set of archives linked everywhere to a shared library. (LP: #1341502). Fixes: https://bugs.launchpad.net/bugs/1341502.

Approved by Cemil Azizoglu, PS Jenkins bot, Alexandros Frantzis, Kevin DuBois.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
set(MIR_GENERATED_INCLUDE_DIRECTORIES)
2
 
set(MIR_COMMON_PLATFORM_LIBRARIES)
 
2
set(MIR_COMMON_LIBRARIES)
3
3
add_subdirectory(protobuf/)
4
4
 
5
5
if (MIR_BUILD_PLATFORM_ANDROID)
15
15
add_subdirectory(thread)
16
16
add_subdirectory(testdraw)
17
17
 
18
 
set(
19
 
  MIR_COMMON_PLATFORM_LIBRARIES
20
 
  ${MIR_COMMON_PLATFORM_LIBRARIES}
21
 
  PARENT_SCOPE)
22
 
 
23
18
set(PREFIX "${CMAKE_INSTALL_PREFIX}")
24
19
set(EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}")
25
20
set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
35
30
  ${MIR_GENERATED_INCLUDE_DIRECTORIES}
36
31
  PARENT_SCOPE)
37
32
 
 
33
 
 
34
add_library(
 
35
  mircommon SHARED
 
36
)
 
37
 
 
38
target_link_libraries(
 
39
  mircommon
 
40
  ${MIR_COMMON_LIBRARIES}
 
41
)
 
42
 
 
43
# TODO we need a place to manage ABI and related versioning but use this as placeholder
 
44
set(MIR_SHARED_ABI 1)
 
45
 
 
46
set_target_properties(
 
47
  mircommon
 
48
 
 
49
  PROPERTIES
 
50
  SOVERSION ${MIR_SHARED_ABI}
 
51
)
 
52
 
 
53
install(TARGETS mircommon LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
 
54
 
38
55
install(
39
56
  DIRECTORY ${CMAKE_SOURCE_DIR}/include/shared/mir ${CMAKE_SOURCE_DIR}/include/shared/mir_toolkit
40
57
  DESTINATION "include/mircommon"