@@ -316,44 +316,42 @@ implementation
316
316
- https://downloads.freepascal.org/fpc/docs-pdf/CinFreePascal.pdf
317
317
}
318
318
319
- { $IFDEF WINDOWS}
319
+ { $if defined( WINDOWS) }
320
320
{ For windows, we always use dynamic link. See
321
321
https://forum.lazarus.freepascal.org/index.php/topic,15712.msg84781.html#msg84781
322
322
We need to rebuild the static lib for windows using Mingw or cygwin
323
323
}
324
324
SherpaOnnxLibName = ' sherpa-onnx-c-api.dll' ;
325
- { $ELSE}
326
- { $IFNDEF SHERPA_ONNX_USE_SHARED_LIBS}
327
- { static link for linux and macos}
328
- { $linklib sherpa-onnx-c-api}
329
- { $linklib sherpa-onnx-core}
330
- { $linklib kaldi-decoder-core}
331
- { $linklib sherpa-onnx-kaldifst-core}
332
- { $linklib sherpa-onnx-fstfar}
333
- { $linklib sherpa-onnx-fst}
334
- { $linklib kaldi-native-fbank-core}
335
- { $linklib piper_phonemize}
336
- { $linklib espeak-ng}
337
- { $linklib ucd}
338
- { $linklib onnxruntime}
339
- { $linklib ssentencepiece_core}
340
-
341
- { $IFDEF LINUX}
342
- { $linklib m}
343
- { $LINKLIB stdc++}
344
- { $LINKLIB gcc_s}
345
- { $ENDIF}
346
-
347
- { $IFDEF DARWIN}
348
- { $linklib c++}
349
- { $ENDIF}
350
- SherpaOnnxLibName = ' ' ;
351
- { $ELSE}
352
- { dynamic link for linux and macos}
353
- SherpaOnnxLibName = ' sherpa-onnx-c-api' ;
354
- { $linklib sherpa-onnx-c-api}
355
- { $ENDIF}
356
- { $ENDIF}
325
+ { $elseif not defined(SHERPA_ONNX_USE_SHARED_LIBS)}
326
+ { static link for linux and macos}
327
+ { $linklib sherpa-onnx-c-api}
328
+ { $linklib sherpa-onnx-core}
329
+ { $linklib kaldi-decoder-core}
330
+ { $linklib sherpa-onnx-kaldifst-core}
331
+ { $linklib sherpa-onnx-fstfar}
332
+ { $linklib sherpa-onnx-fst}
333
+ { $linklib kaldi-native-fbank-core}
334
+ { $linklib piper_phonemize}
335
+ { $linklib espeak-ng}
336
+ { $linklib ucd}
337
+ { $linklib onnxruntime}
338
+ { $linklib ssentencepiece_core}
339
+
340
+ { $ifdef LINUX}
341
+ { $linklib m}
342
+ { $LINKLIB stdc++}
343
+ { $LINKLIB gcc_s}
344
+ { $endif}
345
+
346
+ { $ifdef DARWIN}
347
+ { $linklib c++}
348
+ { $endif}
349
+ SherpaOnnxLibName = ' ' ;
350
+ { $else}
351
+ { dynamic link for linux and macos}
352
+ SherpaOnnxLibName = ' sherpa-onnx-c-api' ;
353
+ { $linklib sherpa-onnx-c-api}
354
+ { $endif}
357
355
358
356
type
359
357
SherpaOnnxWave = record
0 commit comments