summaryrefslogtreecommitdiff
path: root/source/CMakeLists.txt
blob: f430ba8e6c0343d871144386b7e20925d5e2a50f (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
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
cmake_minimum_required(VERSION 2.8.11)
project(mrswatsoncore)

include(${cmake_SCRIPTS_DIR}/ConfigureTarget.cmake)

set(mrswatsoncore_SOURCES
  app/BuildInfo.c
  app/ProgramOption.c
  audio/AudioSettings.c
  audio/SampleBuffer.c
  base/CharString.c
  base/Endian.c
  base/File.c
  base/LinkedList.c
  base/PlatformInfo.c
  io/RiffFile.c
  io/SampleSource.c
  io/SampleSourcePcm.c
  io/SampleSourceSilence.c
  io/SampleSourceWave.c
  logging/ErrorReporter.c
  logging/EventLogger.c
  logging/LogPrinter.c
  midi/MidiEvent.c
  midi/MidiSequence.c
  midi/MidiSource.c
  midi/MidiSourceFile.c
  MrsWatson.c
  MrsWatsonOptions.c
  plugin/Plugin.c
  plugin/PluginChain.c
  plugin/PluginGain.c
  plugin/PluginLimiter.c
  plugin/PluginPassthru.c
  plugin/PluginPreset.c
  plugin/PluginPresetFxp.c
  plugin/PluginPresetInternalProgram.c
  plugin/PluginSilence.c
  plugin/PluginVst2x.cpp
  plugin/PluginVst2xHostCallback.cpp
  plugin/PluginVst2xId.c
  time/AudioClock.c
  time/TaskTimer.c
)

set(mrswatsoncore_HEADERS
  app/BuildInfo.h
  app/ProgramOption.h
  app/ReturnCodes.h
  audio/AudioSettings.h
  audio/SampleBuffer.h
  base/CharString.h
  base/Endian.h
  base/File.h
  base/LinkedList.h
  base/PlatformInfo.h
  base/Types.h
  io/RiffFile.h
  io/SampleSource.h
  io/SampleSourcePcm.h
  io/SampleSourceSilence.h
  io/SampleSourceWave.h
  logging/ErrorReporter.h
  logging/EventLogger.h
  logging/LogPrinter.h
  midi/MidiEvent.h
  midi/MidiSequence.h
  midi/MidiSource.h
  midi/MidiSourceFile.h
  MrsWatson.h
  MrsWatsonOptions.h
  plugin/Plugin.h
  plugin/PluginChain.h
  plugin/PluginGain.h
  plugin/PluginLimiter.h
  plugin/PluginPassthru.h
  plugin/PluginPreset.h
  plugin/PluginPresetFxp.h
  plugin/PluginPresetInternalProgram.h
  plugin/PluginSilence.h
  plugin/PluginVst2x.h
  plugin/PluginVst2xHostCallback.h
  plugin/PluginVst2xId.h
  time/AudioClock.h
  time/TaskTimer.h
)

if(WITH_AUDIOFILE)
  set(mrswatsoncore_SOURCES
    ${mrswatsoncore_SOURCES}
    io/SampleSourceAudiofile.c
  )
  set(mrswatsoncore_HEADERS
    ${mrswatsoncore_HEADERS}
    io/SampleSourceAudiofile.h
  )
  include_directories(${CMAKE_SOURCE_DIR}/vendor/audiofile/libaudiofile)
endif()

# Add some extra platform-specific sources
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
  set(mrswatsoncore_PLATFORM_SOURCES
    plugin/PluginVst2xLinux.cpp
  )
elseif(APPLE)
  set(mrswatsoncore_PLATFORM_SOURCES
    base/PlatformInfoMac.m
    plugin/PluginVst2xMac.cpp
  )
elseif(MSVC)
  set(mrswatsoncore_PLATFORM_SOURCES
    plugin/PluginVst2xWindows.cpp
  )
endif()

source_group(app ".*/app/.*")
source_group(audio ".*/audio/.*")
source_group(base ".*/base/.*")
source_group(io ".*/io/.*")
source_group(logging ".*/logging/.*")
source_group(midi ".*/midi/.*")
source_group(plugin ".*/plugin/.*")
source_group(time ".*/time/.*")

add_library(mrswatsoncore STATIC
  ${mrswatsoncore_SOURCES}
  ${mrswatsoncore_PLATFORM_SOURCES}
  ${mrswatsoncore_HEADERS}
)

add_library(mrswatsoncore64 STATIC
  ${mrswatsoncore_SOURCES}
  ${mrswatsoncore_PLATFORM_SOURCES}
  ${mrswatsoncore_HEADERS}
)

configure_target(mrswatsoncore 32)
configure_target(mrswatsoncore64 64)