~sethj/ubuntu/wily/unity/fix-for-1445595

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
set(UNITY_CORE_DEPS
    glib-2.0
    gio-2.0
    dee-1.0
    sigc++-2.0
    nux-core-4.0
    unity-protocol-private
)
pkg_check_modules (CORE_DEPS REQUIRED ${UNITY_CORE_DEPS})
pkg_check_modules (PRIVATE_CORE_DEPS REQUIRED unity-protocol-private)

#
# Headers & Sources
#
set (CORE_HEADERS
     ActionHandle.h
     ApplicationPreview.h
     AppmenuIndicator.h
     Categories.h
     Category.h
     CheckOptionFilter.h
     ConnectionManager.h
     DBusIndicators.h
     DesktopUtilities.h
     Filter.h
     Filters.h
     GenericPreview.h
     GLibDBusNameWatcher.h
     GLibDBusProxy.h
     GLibDBusServer.h
     GLibSignal.h
     GLibSignal-inl.h
     GLibSource.h
     GLibWrapper.h
     GLibWrapper-inl.h
     GnomeSessionManager.h
     GSettingsScopes.h
     Hud.h
     IndicatorEntry.h
     Indicator.h
     Indicators.h
     MiscUtils.h
     MoviePreview.h
     MultiRangeFilter.h
     MusicPreview.h
     Model.h
     Model-inl.h
     ModelIterator.h
     ModelIterator-inl.h
     ModelRowAdaptor.h
     ModelRowAdaptor-inl.h
     PaymentPreview.h
     Preview.h
     PreviewPlayer.h
     RadioOptionFilter.h
     RatingsFilter.h
     Result.h
     Results.h
     Scope.h
     ScopeData.h
     Scopes.h
     ScopeProxy.h
     ScopeProxyInterface.h
     SessionManager.h
     SocialPreview.h
     Track.h
     Tracks.h
     UWeakPtr.h
     Variant.h
    )

set (CORE_SOURCES
     ApplicationPreview.cpp
     AppmenuIndicator.cpp
     Categories.cpp
     Category.cpp
     ConnectionManager.cpp
     CheckOptionFilter.cpp
     DBusIndicators.cpp
     DesktopUtilities.cpp
     Filter.cpp
     Filters.cpp
     GenericPreview.cpp
     GLibDBusNameWatcher.cpp
     GLibDBusProxy.cpp
     GLibDBusServer.cpp
     GLibSignal.cpp
     GLibSource.cpp
     GLibWrapper.cpp
     GnomeSessionManager.cpp
     GSettingsScopes.cpp
     Hud.cpp
     Indicator.cpp
     IndicatorEntry.cpp
     Indicators.cpp
     MoviePreview.cpp
     MultiRangeFilter.cpp
     MusicPreview.cpp
     ModelRowAdaptor.cpp
     PaymentPreview.cpp
     Preview.cpp
     PreviewPlayer.cpp
     RatingsFilter.cpp
     RadioOptionFilter.cpp
     Result.cpp
     Results.cpp
     Scope.cpp
     ScopeData.cpp
     Scopes.cpp
     ScopeProxy.cpp
     SocialPreview.cpp
     Track.cpp
     Tracks.cpp
     Variant.cpp
    )

#
# CFLAGS and LIBS
#
include_directories(${CORE_DEPS_INCLUDE_DIRS})
include_directories(${CMAKE_BINARY_DIR})
include_directories(..)

set (LIBS ${CORE_DEPS_LDFLAGS} ${PRIVATE_CORE_DEPS_LDFLAGS})

#
# Library
#
# Before making a release, the version string should be updated.
# The string is of the form C:R:A.
# - If interfaces have been changed or added, but binary compatibility has
#   been preserved, change to C+1:0:A+1
# - If binary compatibility has been broken (eg removed or changed interfaces)
#   change to C+1:0:0
# - If the interface is the same as the previous version, change to C:R+1:A
set (CORE_LIB_LT_CURRENT 9)
set (CORE_LIB_LT_REV 0)
set (CORE_LIB_LT_AGE 0)
set (CORE_LIB_LT_VERSION "${CORE_LIB_LT_CURRENT}:${CORE_LIB_LT_REV}:${CORE_LIB_LT_AGE}")

set (CORE_LIB_NAME "unity-core-${UNITY_API_VERSION}")

add_library (${CORE_LIB_NAME} SHARED ${CORE_SOURCES})
target_link_libraries (${CORE_LIB_NAME} ${LIBS})
set_target_properties(${CORE_LIB_NAME} PROPERTIES
                      VERSION ${CORE_LIB_LT_CURRENT}.${CORE_LIB_LT_REV}.${CORE_LIB_LT_AGE}
                      SOVERSION ${CORE_LIB_LT_CURRENT}
                      INSTALL_RPATH "${PRIVATE_CORE_DEPS_LIBRARY_DIRS}")
add_pch(pch/unitycore_pch.hh ${CORE_LIB_NAME})

install (TARGETS ${CORE_LIB_NAME}
         RUNTIME DESTINATION bin
         ARCHIVE DESTINATION lib
         LIBRARY DESTINATION lib
        )

#
# Headers
#
install (FILES ${CORE_HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Unity-${UNITY_API_VERSION}/UnityCore)

#
# PkgConfig file
#
set (EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}")
set (LIBDIR "${CMAKE_INSTALL_PREFIX}/lib")
set (INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include")

configure_file (unity-core.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/${CORE_LIB_NAME}.pc @ONLY)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_LIB_NAME}.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)