@@ -23,22 +23,6 @@ plugin_include_dirs = [
2323dependencies_plugin = [
2424]
2525
26- if os_darwin
27- dependencies_plugin += [
28- dependency (' Accelerate' , method : ' extraframework' ),
29- dependency (' AudioToolbox' , method : ' extraframework' ),
30- dependency (' AudioUnit' , method : ' extraframework' ),
31- dependency (' Carbon' , method : ' extraframework' ),
32- dependency (' Cocoa' , method : ' extraframework' ),
33- dependency (' CoreAudio' , method : ' extraframework' ),
34- dependency (' CoreAudioKit' , method : ' extraframework' ),
35- dependency (' CoreMIDI' , method : ' extraframework' ),
36- dependency (' IOKit' , method : ' extraframework' ),
37- dependency (' QuartzCore' , method : ' extraframework' ),
38- dependency (' WebKit' , method : ' extraframework' ),
39- ]
40- endif
41-
4226if os_windows
4327 dependencies_plugin += [
4428 cc.find_library (' comdlg32' ),
@@ -79,42 +63,6 @@ if optimizations and not linux_embed
7963 ]
8064endif
8165
82- ###############################################################################
83- # link flags for plugins
84-
85- link_flags_plugin_lv2 = [
86- ]
87- link_flags_plugin_vst2 = [
88- ]
89- link_flags_plugin_vst3 = [
90- ]
91-
92- if os_darwin
93- link_flags_plugin_lv2 += [
94- ' -Wl,-exported_symbol,_lv2_generate_ttl' ,
95- ' -Wl,-exported_symbol,_lv2_descriptor' ,
96- ' -Wl,-exported_symbol,_lv2ui_descriptor' ,
97- ]
98- link_flags_plugin_vst2 += [
99- ' -Wl,-exported_symbol,_VSTPluginMain' ,
100- ]
101- link_flags_plugin_vst3 += [
102- ' -Wl,-exported_symbol,_bundleEntry' ,
103- ' -Wl,-exported_symbol,_bundleExit' ,
104- ' -Wl,-exported_symbol,_GetPluginFactory' ,
105- ]
106- else
107- link_flags_plugin_lv2 += [
108- ' -Wl,--version-script=' + meson .source_root() + ' /scripts/plugin-symbols-lv2.version' ,
109- ]
110- link_flags_plugin_vst2 += [
111- ' -Wl,--version-script=' + meson .source_root() + ' /scripts/plugin-symbols-vst2.version' ,
112- ]
113- link_flags_plugin_vst3 += [
114- ' -Wl,--version-script=' + meson .source_root() + ' /scripts/plugin-symbols-vst3.version' ,
115- ]
116- endif
117-
11866###############################################################################
11967# combine flags depending on build type
12068
12573endif
12674
12775###############################################################################
128- # format-specific flags
76+ # format-specific build flags
12977
13078build_flags_plugin_lv2 = [
13179 ' -DJucePlugin_Build_AU=0' ,
@@ -168,6 +116,51 @@ if os_windows
168116 ]
169117endif
170118
119+ ###############################################################################
120+ # format-specific link flags
121+
122+ link_flags_plugin_common = [
123+ ]
124+
125+ if os_darwin
126+ link_flags_plugin_common += [
127+ ' -framework' , ' Accelerate' ,
128+ ' -framework' , ' AudioToolbox' ,
129+ ' -framework' , ' AudioUnit' ,
130+ ' -framework' , ' Carbon' ,
131+ ' -framework' , ' Cocoa' ,
132+ ' -framework' , ' CoreAudio' ,
133+ ' -framework' , ' CoreAudioKit' ,
134+ ' -framework' , ' CoreMIDI' ,
135+ ' -framework' , ' IOKit' ,
136+ ' -framework' , ' QuartzCore' ,
137+ ' -framework' , ' WebKit' ,
138+ ]
139+ link_flags_plugin_lv2 = [
140+ ' -Wl,-exported_symbol,_lv2_generate_ttl' ,
141+ ' -Wl,-exported_symbol,_lv2_descriptor' ,
142+ ' -Wl,-exported_symbol,_lv2ui_descriptor' ,
143+ ]
144+ link_flags_plugin_vst2 = [
145+ ' -Wl,-exported_symbol,_VSTPluginMain' ,
146+ ]
147+ link_flags_plugin_vst3 = [
148+ ' -Wl,-exported_symbol,_bundleEntry' ,
149+ ' -Wl,-exported_symbol,_bundleExit' ,
150+ ' -Wl,-exported_symbol,_GetPluginFactory' ,
151+ ]
152+ else
153+ link_flags_plugin_lv2 = [
154+ ' -Wl,--version-script=' + meson .source_root() + ' /scripts/plugin-symbols-lv2.version' ,
155+ ]
156+ link_flags_plugin_vst2 = [
157+ ' -Wl,--version-script=' + meson .source_root() + ' /scripts/plugin-symbols-vst2.version' ,
158+ ]
159+ link_flags_plugin_vst3 = [
160+ ' -Wl,--version-script=' + meson .source_root() + ' /scripts/plugin-symbols-vst3.version' ,
161+ ]
162+ endif
163+
171164###############################################################################
172165
173166foreach plugin : plugins
@@ -188,8 +181,8 @@ foreach plugin : plugins
188181
189182 if plugin_uses_opengl
190183 if os_darwin
191- plugin_extra_dependencies += [
192- dependency ( ' OpenGL ' , method : ' extraframework ' ) ,
184+ plugin_extra_link_flags += [
185+ ' -framework ' , ' OpenGL ' ,
193186 ]
194187 elif os_windows
195188 plugin_extra_dependencies += [
@@ -228,7 +221,7 @@ foreach plugin : plugins
228221 ],
229222 c_args : build_flags + build_flags_plugin + build_flags_plugin_lv2 + plugin_extra_build_flags,
230223 cpp_args : build_flags_cpp + build_flags_plugin + build_flags_plugin_lv2 + build_flag_plugin_cpp + plugin_extra_build_flags,
231- link_args : link_flags + link_flags_plugin_lv2,
224+ link_args : link_flags + link_flags_plugin_common + link_flags_plugin_lv2,
232225 link_with : [ lib_juce_current, plugin_lib ],
233226 )
234227
@@ -259,7 +252,7 @@ foreach plugin : plugins
259252 ],
260253 c_args : build_flags + build_flags_plugin + build_flags_plugin_vst2 + plugin_extra_build_flags,
261254 cpp_args : build_flags_cpp + build_flags_plugin + build_flags_plugin_vst2 + build_flag_plugin_cpp + plugin_extra_build_flags,
262- link_args : link_flags + link_flags_plugin_vst2,
255+ link_args : link_flags + link_flags_plugin_common + link_flags_plugin_vst2,
263256 link_with : [ lib_juce_current, plugin_lib ],
264257 install : true ,
265258 install_dir : vst2dir,
@@ -277,7 +270,7 @@ foreach plugin : plugins
277270 ],
278271 c_args : build_flags + build_flags_plugin + build_flags_plugin_vst3 + plugin_extra_build_flags,
279272 cpp_args : build_flags_cpp + build_flags_plugin + build_flags_plugin_vst3 + build_flag_plugin_cpp + plugin_extra_build_flags,
280- link_args : link_flags + link_flags_plugin_vst3,
273+ link_args : link_flags + link_flags_plugin_common + link_flags_plugin_vst3,
281274 link_with : [ lib_juce_current, plugin_lib ],
282275 )
283276
0 commit comments