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
|
set (CORE_LIB_VERSION 0.1)
set (CORE_LIB_SOVERSION 0)
######################
# lib PC file
######################
set (CONFIG_FILE ${CMAKE_CURRENT_BINARY_DIR}/config.vala)
set (PREFIX ${CMAKE_INSTALL_PREFIX})
set (DOLLAR "$") # You hear that? It's kittens being killed by the gods of cmake
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.vala.cmake ${CONFIG_FILE})
configure_file (${CMAKE_SOURCE_DIR}/core/${CORE_LIBRARY_NAME}.pc.cmake ${CMAKE_BINARY_DIR}/core/${CORE_LIBRARY_NAME}.pc)
message (${CONFIG_FILE})
set (CORE_SOURCE
${CONFIG_FILE}
PluginManager.vala
Settings.vala
EqualizerPreset.vala
Player.vala
LibraryWindowInterface.vala
Library.vala
LibrariesManager.vala
NotificationManager.vala
Media.vala
Album.vala
Resources.vala
Devices/Device.vala
Devices/NetworkDevice.vala
Devices/DeviceManager.vala
Devices/DevicePreferences.vala
Playlists/Playlist.vala
Playlists/StaticPlaylist.vala
Playlists/SmartPlaylist.vala
Playlists/SmartQuery.vala
Utils/FileUtils.vala
Utils/TimeUtils.vala
Utils/String.vala
Utils/Numeric.vala
Utils/UI.vala
Utils/CompareFunctionHolder.vala
Utils/Utils.vala
Utils/PlaylistsUtils.vala
Utils/Threads.vala
Utils/Icon.vala
Utils/Icons.vala
Utils/Search.vala
Utils/PixbufUtils.vala
Utils/PixbufCache.vala
GStreamer/Pipeline.vala
GStreamer/Equalizer.vala
GStreamer/Playback.vala
Widgets/SettingsWidgets.vala
)
if (BUILD_SHARED_LIBS)
set (LINK_MODE SHARED)
else ()
set (LINK_MODE STATIC)
endif ()
vala_precompile (CORE_VALA_C ${CORE_LIBRARY_NAME}
${CORE_SOURCE}
PACKAGES
${CORE_PACKAGES}
OPTIONS
${BASIC_VALAC_OPTIONS}
GENERATE_VAPI
${CORE_LIBRARY_NAME}
GENERATE_HEADER
${CORE_LIBRARY_NAME}
)
add_definitions (${CORE_DEPS_CFLAGS})
link_directories (${CORE_DEPS_LIBRARY_DIRS})
add_library (${CORE_LIBRARY_NAME} ${LINK_MODE} ${CORE_VALA_C})
set_target_properties (${CORE_LIBRARY_NAME} PROPERTIES
OUTPUT_NAME ${CORE_LIBRARY_NAME}
VERSION ${CORE_LIB_VERSION}
SOVERSION ${CORE_LIB_SOVERSION}
)
target_link_libraries (${CORE_LIBRARY_NAME} ${CORE_DEPS_LIBRARIES})
if (BUILD_SHARED_LIBS)
install (TARGETS ${CORE_LIBRARY_NAME} DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
# Install lib stuffs
install (FILES ${CMAKE_BINARY_DIR}/core/${CORE_LIBRARY_NAME}.pc DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig/)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_LIBRARY_NAME}.vapi DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/vala/vapi/)
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CORE_LIBRARY_NAME}.deps DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/vala/vapi/)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_LIBRARY_NAME}.h DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/${CORE_LIBRARY_NAME}/)
endif ()
|