summaryrefslogtreecommitdiffstats
path: root/akode/lib/CMakeLists.txt
blob: 9ecb4725a5b482b1b642ea1fe9d6dbc7af4d2f4e (plain)
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
#################################################
#
#  (C) 2015 Slávek Banko
#  slavek (DOT) banko (AT) axis.cz
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

include_directories(
  ${CMAKE_BINARY_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
)

if( UNIX )
  set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden" )
  set( __KDE_HAVE_GCC_VISIBILITY 1 )
endif( UNIX )
configure_file( akode_export.h.cmake akode_export.h @ONLY )


##### library ###################################

set( target akode )

set( ${target}_SRCS
  bytebuffer.cpp
  audiobuffer.cpp
  pluginhandler.cpp
  decoderpluginhandler.cpp
  resamplerpluginhandler.cpp
  sinkpluginhandler.cpp
  encoderpluginhandler.cpp
  fast_resampler.cpp
  crossfader.cpp
  volumefilter.cpp
  localfile.cpp
  mmapfile.cpp
  wav_decoder.cpp
  auto_sink.cpp
  void_sink.cpp
  converter.cpp
  buffered_decoder.cpp
  player.cpp
  magic.cpp
)

tde_add_library(
  ${target} SHARED
  VERSION 2.0.0
  SOURCES ${${target}_SRCS}
  LINK ${CMAKE_THREAD_LIBS_INIT} ${AKODE_LIBDL} ${SEM_LIBRARIES}
  DESTINATION ${LIB_INSTALL_DIR}
)

set_property(
  TARGET ${target}-shared
  APPEND PROPERTY COMPILE_DEFINITIONS
  AKODE_SEARCHDIR="${LIB_INSTALL_DIR}"
)


##### headers ###################################

set( ${target}_INCLUDES
  ${CMAKE_CURRENT_BINARY_DIR}/akode_export.h
  akodelib.h
  decoder.h
  sink.h
  encoder.h
  audioconfiguration.h
  audioframe.h
  audiobuffer.h
  bytebuffer.h
  file.h
  localfile.h
  mmapfile.h
  pluginhandler.h
  crossfader.h
  volumefilter.h
  resampler.h
  fast_resampler.h
  buffered_decoder.h
  wav_decoder.h
  auto_sink.h
  void_sink.h
  player.h
  magic.h
  converter.h
  framedecoder.h
)

install(
  FILES ${${target}_INCLUDES}
  DESTINATION ${INCLUDE_INSTALL_DIR}/akode
)