Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CMakeLists.txt 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865
  1. cmake_minimum_required(VERSION 3.15)
  2. project(carla)
  3. set(CMAKE_POLICY_DEFAULT_CMP0025 NEW)
  4. set(CMAKE_POLICY_DEFAULT_CMP0063 NEW)
  5. set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
  6. set(CMAKE_C_STANDARD 11)
  7. set(CMAKE_CXX_STANDARD 11)
  8. set(CMAKE_C_VISIBILITY_PRESET hidden)
  9. set(CMAKE_CXX_VISIBILITY_PRESET hidden)
  10. set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE)
  11. set_property(GLOBAL PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
  12. #######################################################################################################################
  13. # fix compat with cmake < 3.26
  14. if(CMAKE_VERSION VERSION_LESS 3.26)
  15. if(MSVC)
  16. set(CMAKE_C_COMPILER_FRONTEND_VARIANT "MSVC")
  17. else()
  18. set(CMAKE_C_COMPILER_FRONTEND_VARIANT "GNU")
  19. endif()
  20. mark_as_advanced(CMAKE_C_COMPILER_FRONTEND_VARIANT)
  21. endif()
  22. #######################################################################################################################
  23. # build options
  24. set(CARLA_USE_JACK TRUE CACHE BOOL "Enable JACK")
  25. set(CARLA_USE_OSC TRUE CACHE BOOL "Enable OSC")
  26. #######################################################################################################################
  27. # required dependencies
  28. find_package(Threads REQUIRED)
  29. if(NOT (APPLE OR HAIKU OR WIN32))
  30. set(CARLA_LIBDL dl)
  31. set(CARLA_LIBM m)
  32. set(CARLA_LIBRT rt)
  33. endif()
  34. #######################################################################################################################
  35. # optional dependencies
  36. find_package(PkgConfig)
  37. # homebrew does not support universal binaries, disable external deps if it is in use
  38. if(APPLE)
  39. find_program(HOMEBREW brew)
  40. if(HOMEBREW)
  41. set(PKGCONFIG_FOUND FALSE)
  42. mark_as_advanced(PKGCONFIG_FOUND)
  43. endif()
  44. endif()
  45. if(PKGCONFIG_FOUND)
  46. pkg_check_modules(FLUIDSYNTH IMPORTED_TARGET fluidsynth)
  47. pkg_check_modules(SNDFILE IMPORTED_TARGET sndfile)
  48. else()
  49. set(FLUIDSYNTH_FOUND FALSE)
  50. set(LIBLO_FOUND FALSE)
  51. set(SNDFILE_FOUND FALSE)
  52. endif()
  53. if(PKGCONFIG_FOUND AND CARLA_USE_OSC)
  54. pkg_check_modules(LIBLO IMPORTED_TARGET liblo)
  55. else()
  56. set(LIBLO_FOUND FALSE)
  57. endif()
  58. if(PKGCONFIG_FOUND AND NOT WIN32)
  59. pkg_check_modules(LIBMAGIC IMPORTED_TARGET libmagic)
  60. else()
  61. set(LIBMAGIC_FOUND FALSE)
  62. endif()
  63. if(PKGCONFIG_FOUND AND NOT (APPLE OR WIN32))
  64. pkg_check_modules(X11 IMPORTED_TARGET x11)
  65. else()
  66. set(X11_FOUND FALSE)
  67. endif()
  68. add_library(carla-none INTERFACE)
  69. if(NOT FLUIDSYNTH_FOUND)
  70. add_library(PkgConfig::FLUIDSYNTH ALIAS carla-none)
  71. endif()
  72. if(NOT LIBLO_FOUND)
  73. add_library(PkgConfig::LIBLO ALIAS carla-none)
  74. endif()
  75. if(NOT LIBMAGIC_FOUND)
  76. add_library(PkgConfig::LIBMAGIC ALIAS carla-none)
  77. endif()
  78. if(NOT SNDFILE_FOUND)
  79. add_library(PkgConfig::SNDFILE ALIAS carla-none)
  80. endif()
  81. if(NOT X11_FOUND)
  82. add_library(PkgConfig::X11 ALIAS carla-none)
  83. endif()
  84. #######################################################################################################################
  85. # utilities
  86. function(set_common_target_properties TARGET)
  87. target_compile_definitions(${TARGET}
  88. PRIVATE
  89. BUILDING_CARLA
  90. HAVE_YSFX
  91. $<$<BOOL:${CARLA_USE_JACK}>:HAVE_JACK>
  92. $<$<BOOL:${FLUIDSYNTH_FOUND}>:HAVE_FLUIDSYNTH>
  93. $<$<BOOL:${LIBLO_FOUND}>:HAVE_LIBLO>
  94. $<$<BOOL:${LIBMAGIC_FOUND}>:HAVE_LIBMAGIC>
  95. $<$<BOOL:${SNDFILE_FOUND}>:HAVE_SNDFILE>
  96. $<$<BOOL:${X11_FOUND}>:HAVE_X11>
  97. )
  98. target_compile_options(${TARGET}
  99. PRIVATE
  100. $<$<BOOL:${MSVC}>:/wd4244 /wd4267 /wd4273>
  101. )
  102. target_link_options(${TARGET}
  103. PRIVATE
  104. $<$<C_COMPILER_ID:GNU>:-Wl,--no-undefined>
  105. )
  106. set_property(TARGET ${TARGET} PROPERTY POSITION_INDEPENDENT_CODE ON)
  107. if(APPLE)
  108. set_property(TARGET ${TARGET} APPEND PROPERTY OSX_ARCHITECTURES arm64)
  109. set_property(TARGET ${TARGET} APPEND PROPERTY OSX_ARCHITECTURES x86_64)
  110. endif()
  111. endfunction()
  112. #######################################################################################################################
  113. # audio_decoder
  114. add_library(carla-audio-decoder STATIC)
  115. add_library(carla::audio-decoder ALIAS carla-audio-decoder)
  116. set_common_target_properties(carla-audio-decoder)
  117. target_include_directories(carla-audio-decoder
  118. PRIVATE
  119. ../source/includes
  120. ../source/modules
  121. ../source/utils
  122. )
  123. target_link_libraries(carla-audio-decoder
  124. PRIVATE
  125. PkgConfig::SNDFILE
  126. )
  127. target_sources(carla-audio-decoder
  128. PRIVATE
  129. ../source/modules/audio_decoder/ad_dr_mp3.c
  130. ../source/modules/audio_decoder/ad_ffmpeg.c
  131. ../source/modules/audio_decoder/ad_minimp3.c
  132. ../source/modules/audio_decoder/ad_plugin.c
  133. ../source/modules/audio_decoder/ad_soundfile.c
  134. )
  135. #######################################################################################################################
  136. # jackbridge
  137. add_library(carla-jackbridge STATIC)
  138. add_library(carla::jackbridge ALIAS carla-jackbridge)
  139. set_common_target_properties(carla-jackbridge)
  140. target_include_directories(carla-jackbridge
  141. PRIVATE
  142. ../source/includes
  143. ../source/utils
  144. )
  145. target_link_libraries(carla-jackbridge
  146. PRIVATE
  147. ${CARLA_LIBDL}
  148. ${CARLA_LIBRT}
  149. )
  150. target_sources(carla-jackbridge
  151. PRIVATE
  152. ../source/jackbridge/JackBridge1.cpp
  153. ../source/jackbridge/JackBridge2.cpp
  154. )
  155. #######################################################################################################################
  156. # lilv
  157. # serd
  158. add_library(carla-lilv_serd STATIC)
  159. set_common_target_properties(carla-lilv_serd)
  160. target_compile_options(carla-lilv_serd
  161. PRIVATE
  162. $<$<BOOL:${MSVC}>:/wd4005>
  163. $<$<BOOL:${MSVC}>:/wd4090>
  164. $<$<BOOL:${MSVC}>:/wd4133>
  165. $<$<C_COMPILER_ID:GNU>:-Wno-format-overflow>
  166. $<$<C_COMPILER_ID:GNU>:-Wno-implicit-fallthrough>
  167. )
  168. target_include_directories(carla-lilv_serd
  169. PRIVATE
  170. ../source/includes
  171. ../source/modules/lilv/config
  172. ../source/modules/lilv/serd-0.24.0
  173. )
  174. target_sources(carla-lilv_serd
  175. PRIVATE
  176. ../source/modules/lilv/serd.c
  177. )
  178. # sord
  179. add_library(carla-lilv_sord STATIC)
  180. set_common_target_properties(carla-lilv_sord)
  181. target_compile_options(carla-lilv_sord
  182. PRIVATE
  183. $<$<BOOL:${MSVC}>:/wd4005>
  184. $<$<BOOL:${MSVC}>:/wd4090>
  185. $<$<BOOL:${MSVC}>:/wd4133>
  186. $<$<C_COMPILER_ID:GNU>:-Wno-maybe-uninitialized>
  187. $<$<STREQUAL:${CMAKE_C_COMPILER_FRONTEND_VARIANT},GNU>:-Wno-unused-parameter>
  188. # workaround compiler bug, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109585
  189. $<$<C_COMPILER_ID:GNU>:-fno-strict-aliasing>
  190. )
  191. target_include_directories(carla-lilv_sord
  192. PRIVATE
  193. ../source/includes
  194. ../source/modules/lilv/config
  195. ../source/modules/lilv/sord-0.16.0
  196. ../source/modules/lilv/sord-0.16.0/src
  197. )
  198. target_link_libraries(carla-lilv_sord
  199. PRIVATE
  200. carla-lilv_serd
  201. )
  202. target_sources(carla-lilv_sord
  203. PRIVATE
  204. ../source/modules/lilv/sord.c
  205. )
  206. # sratom
  207. add_library(carla-lilv_sratom STATIC)
  208. set_common_target_properties(carla-lilv_sratom)
  209. target_compile_options(carla-lilv_sratom
  210. PRIVATE
  211. $<$<BOOL:${MSVC}>:/wd4005>
  212. $<$<BOOL:${MSVC}>:/wd4090>
  213. $<$<BOOL:${MSVC}>:/wd4133>
  214. )
  215. target_include_directories(carla-lilv_sratom
  216. PRIVATE
  217. ../source/includes
  218. ../source/modules/lilv/config
  219. ../source/modules/lilv/sratom-0.6.0
  220. )
  221. target_link_libraries(carla-lilv_sratom
  222. PRIVATE
  223. carla-lilv_serd
  224. )
  225. target_sources(carla-lilv_sratom
  226. PRIVATE
  227. ../source/modules/lilv/sratom.c
  228. )
  229. # lilv
  230. add_library(carla-lilv_lilv STATIC)
  231. set_common_target_properties(carla-lilv_lilv)
  232. target_compile_options(carla-lilv_lilv
  233. PRIVATE
  234. $<$<BOOL:${MSVC}>:/wd4005>
  235. $<$<BOOL:${MSVC}>:/wd4090>
  236. $<$<BOOL:${MSVC}>:/wd4133>
  237. $<$<C_COMPILER_ID:AppleClang>:-Wno-incompatible-pointer-types-discards-qualifiers>
  238. $<$<C_COMPILER_ID:GNU>:-Wno-deprecated-declarations>
  239. $<$<C_COMPILER_ID:GNU>:-Wno-discarded-qualifiers>
  240. $<$<C_COMPILER_ID:GNU>:-Wno-format-overflow>
  241. $<$<STREQUAL:${CMAKE_C_COMPILER_FRONTEND_VARIANT},GNU>:-Wno-unused-parameter>
  242. )
  243. target_include_directories(carla-lilv_lilv
  244. PRIVATE
  245. ../source/includes
  246. ../source/modules/lilv/config
  247. ../source/modules/lilv/lilv-0.24.0
  248. ../source/modules/lilv/lilv-0.24.0/src
  249. )
  250. target_link_libraries(carla-lilv_lilv
  251. PRIVATE
  252. carla-lilv_serd
  253. carla-lilv_sord
  254. carla-lilv_sratom
  255. )
  256. target_sources(carla-lilv_lilv
  257. PRIVATE
  258. ../source/modules/lilv/lilv.c
  259. )
  260. # combined target
  261. add_library(carla-lilv INTERFACE)
  262. add_library(carla::lilv ALIAS carla-lilv)
  263. target_link_libraries(carla-lilv
  264. INTERFACE
  265. carla-lilv_serd
  266. carla-lilv_sord
  267. carla-lilv_sratom
  268. carla-lilv_lilv
  269. ${CARLA_LIBDL}
  270. ${CARLA_LIBM}
  271. ${CARLA_LIBRT}
  272. )
  273. #######################################################################################################################
  274. # native-plugins
  275. add_library(carla-native-plugins STATIC)
  276. add_library(carla::native-plugins ALIAS carla-native-plugins)
  277. set_common_target_properties(carla-native-plugins)
  278. target_include_directories(carla-native-plugins
  279. PRIVATE
  280. ../source/includes
  281. ../source/modules
  282. ../source/utils
  283. )
  284. target_sources(carla-native-plugins
  285. PRIVATE
  286. ../source/native-plugins/_all.c
  287. ../source/native-plugins/_data.cpp
  288. ../source/native-plugins/audio-gain.c
  289. ../source/native-plugins/bypass.c
  290. ../source/native-plugins/cv-to-audio.c
  291. ../source/native-plugins/lfo.c
  292. ../source/native-plugins/midi-channel-filter.c
  293. ../source/native-plugins/midi-channel-ab.c
  294. ../source/native-plugins/midi-channelize.c
  295. ../source/native-plugins/midi-gain.c
  296. ../source/native-plugins/midi-join.c
  297. ../source/native-plugins/midi-split.c
  298. ../source/native-plugins/midi-to-cv.c
  299. ../source/native-plugins/midi-through.c
  300. ../source/native-plugins/midi-transpose.c
  301. ../source/native-plugins/audio-file.cpp
  302. ../source/native-plugins/midi-file.cpp
  303. # these rely on PyQt, skip them
  304. # ../source/native-plugins/bigmeter.cpp
  305. # ../source/native-plugins/midi-pattern.cpp
  306. # ../source/native-plugins/notes.cpp
  307. # ../source/native-plugins/xycontroller.cpp
  308. )
  309. #######################################################################################################################
  310. # rtmempool
  311. add_library(carla-rtmempool STATIC)
  312. add_library(carla::rtmempool ALIAS carla-rtmempool)
  313. set_common_target_properties(carla-rtmempool)
  314. target_include_directories(carla-rtmempool
  315. PRIVATE
  316. ../source/includes
  317. ../source/utils
  318. )
  319. target_link_libraries(carla-rtmempool
  320. PRIVATE
  321. ${CARLA_LIBDL}
  322. ${CARLA_LIBRT}
  323. )
  324. target_sources(carla-rtmempool
  325. PRIVATE
  326. ../source/modules/rtmempool/rtmempool.c
  327. )
  328. #######################################################################################################################
  329. # sfzero
  330. add_library(carla-sfzero STATIC)
  331. add_library(carla::sfzero ALIAS carla-sfzero)
  332. set_common_target_properties(carla-sfzero)
  333. target_include_directories(carla-sfzero
  334. PRIVATE
  335. ../source/includes
  336. ../source/modules
  337. ../source/utils
  338. )
  339. target_link_libraries(carla-sfzero
  340. PRIVATE
  341. carla-audio-decoder
  342. )
  343. target_sources(carla-sfzero
  344. PRIVATE
  345. ../source/modules/sfzero/SFZero.cpp
  346. )
  347. #######################################################################################################################
  348. # water
  349. add_library(carla-water STATIC)
  350. add_library(carla::water ALIAS carla-water)
  351. set_common_target_properties(carla-water)
  352. target_compile_options(carla-water
  353. PRIVATE
  354. $<$<STREQUAL:${CMAKE_C_COMPILER_FRONTEND_VARIANT},GNU>:-Wno-deprecated-copy>
  355. )
  356. target_include_directories(carla-water
  357. PRIVATE
  358. ../source/includes
  359. ../source/utils
  360. )
  361. target_link_libraries(carla-water
  362. PRIVATE
  363. $<$<BOOL:${APPLE}>:$<LINK_LIBRARY:FRAMEWORK,AppKit.framework>>
  364. $<$<BOOL:${WIN32}>:comdlg32>
  365. $<$<BOOL:${WIN32}>:ole32>
  366. $<$<BOOL:${WIN32}>:winmm>
  367. ${CARLA_LIBDL}
  368. ${CARLA_LIBRT}
  369. )
  370. target_sources(carla-water
  371. PRIVATE
  372. ../source/modules/water/water.cpp
  373. )
  374. #######################################################################################################################
  375. # water-files
  376. add_library(carla-water-files STATIC)
  377. add_library(carla::water-files ALIAS carla-water-files)
  378. set_common_target_properties(carla-water-files)
  379. target_compile_options(carla-water-files
  380. PRIVATE
  381. $<$<STREQUAL:${CMAKE_C_COMPILER_FRONTEND_VARIANT},GNU>:-Wno-deprecated-copy>
  382. )
  383. target_include_directories(carla-water-files
  384. PRIVATE
  385. ../source/includes
  386. ../source/utils
  387. )
  388. target_link_libraries(carla-water-files
  389. PRIVATE
  390. $<$<BOOL:${APPLE}>:$<LINK_LIBRARY:FRAMEWORK,AppKit.framework>>
  391. $<$<BOOL:${WIN32}>:ole32>
  392. $<$<BOOL:${WIN32}>:winmm>
  393. ${CARLA_LIBDL}
  394. )
  395. target_sources(carla-water-files
  396. PRIVATE
  397. ../source/modules/water/water.files.cpp
  398. )
  399. #######################################################################################################################
  400. # ysfx
  401. add_library(carla-ysfx STATIC)
  402. add_library(carla::ysfx ALIAS carla-ysfx)
  403. set_common_target_properties(carla-ysfx)
  404. # YSFX_FTS_LACKS_LFS_SUPPORT
  405. target_compile_definitions(carla-ysfx
  406. PRIVATE
  407. EEL_TARGET_PORTABLE
  408. EELSCRIPT_NO_NET
  409. EELSCRIPT_NO_LICE
  410. NSEEL_ATOF=ysfx_wdl_atof
  411. WDL_FFT_REALSIZE=8
  412. WDL_LINEPARSE_ATOF=ysfx_wdl_atof
  413. WDL_WIN32_UTF8_NO_UI_IMPL
  414. YSFX_API=
  415. YSFX_NO_GFX
  416. YSFX_NO_STANDARD_MUTEX
  417. $<$<BOOL:${WIN32}>:NOMINMAX>
  418. $<$<NOT:$<BOOL:${MINGW}>>:_FILE_OFFSET_BITS=64>
  419. )
  420. # NOTE ugly -U /U due to cmake not supporting `target_remove_definitions`
  421. # see https://gitlab.kitware.com/cmake/cmake/-/issues/19796
  422. target_compile_options(carla-ysfx
  423. PRIVATE
  424. $<$<BOOL:${MINGW}>:-UUNICODE>
  425. $<$<BOOL:${MINGW}>:-U_UNICODE>
  426. $<$<BOOL:${MSVC}>:/wd4297>
  427. $<$<BOOL:${MSVC}>:/UUNICODE>
  428. $<$<BOOL:${MSVC}>:/U_UNICODE>
  429. $<$<C_COMPILER_ID:GNU>:-Wno-extra>
  430. $<$<C_COMPILER_ID:GNU>:-Wno-ignored-attributes>
  431. $<$<C_COMPILER_ID:GNU>:-Wno-unused-function>
  432. $<$<STREQUAL:${CMAKE_C_COMPILER_FRONTEND_VARIANT},GNU>:-fsigned-char>
  433. $<$<STREQUAL:${CMAKE_C_COMPILER_FRONTEND_VARIANT},GNU>:-Wno-sign-compare>
  434. $<$<STREQUAL:${CMAKE_C_COMPILER_FRONTEND_VARIANT},GNU>:-Wno-unused-parameter>
  435. $<$<AND:$<COMPILE_LANGUAGE:C>,$<STREQUAL:${CMAKE_C_COMPILER_FRONTEND_VARIANT},GNU>>:-Wno-missing-field-initializers>
  436. $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:GNU>>:-Wno-deprecated-copy>
  437. )
  438. target_include_directories(carla-ysfx
  439. PRIVATE
  440. ../source/modules/ysfx/include
  441. ../source/modules/ysfx/sources
  442. ../source/modules/ysfx/thirdparty/dr_libs
  443. ../source/modules/ysfx/thirdparty/stb
  444. ../source/modules/ysfx/thirdparty/WDL/source
  445. )
  446. target_sources(carla-ysfx
  447. PRIVATE
  448. ../source/modules/ysfx/sources/ysfx.cpp
  449. ../source/modules/ysfx/sources/ysfx_api_eel.cpp
  450. ../source/modules/ysfx/sources/ysfx_api_file.cpp
  451. ../source/modules/ysfx/sources/ysfx_api_gfx.cpp
  452. ../source/modules/ysfx/sources/ysfx_api_reaper.cpp
  453. ../source/modules/ysfx/sources/ysfx_audio_flac.cpp
  454. ../source/modules/ysfx/sources/ysfx_audio_wav.cpp
  455. ../source/modules/ysfx/sources/ysfx_config.cpp
  456. ../source/modules/ysfx/sources/ysfx_eel_utils.cpp
  457. ../source/modules/ysfx/sources/ysfx_midi.cpp
  458. ../source/modules/ysfx/sources/ysfx_parse.cpp
  459. ../source/modules/ysfx/sources/ysfx_reader.cpp
  460. ../source/modules/ysfx/sources/ysfx_utils.cpp
  461. ../source/modules/ysfx/sources/ysfx_utils_fts.cpp
  462. ../source/modules/ysfx/sources/eel2-gas/sources/asm-nseel-x64-sse.S
  463. ../source/modules/ysfx/thirdparty/WDL/source/WDL/eel2/nseel-caltab.c
  464. ../source/modules/ysfx/thirdparty/WDL/source/WDL/eel2/nseel-cfunc.c
  465. ../source/modules/ysfx/thirdparty/WDL/source/WDL/eel2/nseel-compiler.c
  466. ../source/modules/ysfx/thirdparty/WDL/source/WDL/eel2/nseel-eval.c
  467. ../source/modules/ysfx/thirdparty/WDL/source/WDL/eel2/nseel-lextab.c
  468. ../source/modules/ysfx/thirdparty/WDL/source/WDL/eel2/nseel-ram.c
  469. ../source/modules/ysfx/thirdparty/WDL/source/WDL/eel2/nseel-yylex.c
  470. ../source/modules/ysfx/thirdparty/WDL/source/WDL/fft.c
  471. $<$<BOOL:${WIN32}>:../source/modules/ysfx/thirdparty/WDL/source/WDL/win32_utf8.c>
  472. )
  473. #######################################################################################################################
  474. # zita-resampler
  475. add_library(carla-zita-resampler STATIC)
  476. add_library(carla::zita-resampler ALIAS carla-zita-resampler)
  477. set_common_target_properties(carla-zita-resampler)
  478. target_include_directories(carla-zita-resampler
  479. PRIVATE
  480. ../source/includes
  481. )
  482. target_sources(carla-zita-resampler
  483. PRIVATE
  484. ../source/modules/zita-resampler/cresampler.cc
  485. ../source/modules/zita-resampler/resampler-table.cc
  486. ../source/modules/zita-resampler/resampler.cc
  487. ../source/modules/zita-resampler/vresampler.cc
  488. )
  489. #######################################################################################################################
  490. # carla bridge
  491. add_executable(carla-bridge-native)
  492. set_common_target_properties(carla-bridge-native)
  493. target_compile_definitions(carla-bridge-native
  494. PRIVATE
  495. BUILD_BRIDGE
  496. CARLA_LIB_EXT="${CMAKE_SHARED_LIBRARY_SUFFIX}"
  497. )
  498. # FIXME
  499. target_compile_options(carla-bridge-native
  500. PRIVATE
  501. $<$<C_COMPILER_ID:AppleClang>:-Wno-unused-but-set-variable>
  502. $<$<C_COMPILER_ID:GNU>:-Wno-format-truncation>
  503. $<$<C_COMPILER_ID:GNU>:-Wno-stringop-overflow>
  504. $<$<C_COMPILER_ID:GNU>:-Wno-unused-parameter>
  505. $<$<STREQUAL:${CMAKE_C_COMPILER_FRONTEND_VARIANT},GNU>:-Wno-unused-parameter>
  506. )
  507. target_include_directories(carla-bridge-native
  508. PRIVATE
  509. ../source
  510. ../source/backend
  511. ../source/backend/engine
  512. ../source/backend/plugin
  513. ../source/includes
  514. ../source/modules
  515. ../source/utils
  516. )
  517. target_link_libraries(carla-bridge-native
  518. PRIVATE
  519. carla-audio-decoder
  520. carla-jackbridge
  521. carla-lilv
  522. carla-native-plugins
  523. carla-rtmempool
  524. carla-sfzero
  525. carla-water
  526. carla-ysfx
  527. carla-zita-resampler
  528. PkgConfig::FLUIDSYNTH
  529. PkgConfig::LIBLO
  530. PkgConfig::LIBMAGIC
  531. PkgConfig::X11
  532. ${CMAKE_THREAD_LIBS_INIT}
  533. )
  534. target_sources(carla-bridge-native
  535. PRIVATE
  536. ../source/bridges-plugin/CarlaBridgePlugin.cpp
  537. ../source/backend/CarlaStandalone.cpp
  538. ../source/backend/engine/CarlaEngine.cpp
  539. ../source/backend/engine/CarlaEngineBridge.cpp
  540. ../source/backend/engine/CarlaEngineClient.cpp
  541. ../source/backend/engine/CarlaEngineDummy.cpp
  542. ../source/backend/engine/CarlaEngineData.cpp
  543. ../source/backend/engine/CarlaEngineGraph.cpp
  544. ../source/backend/engine/CarlaEngineInternal.cpp
  545. ../source/backend/engine/CarlaEnginePorts.cpp
  546. ../source/backend/engine/CarlaEngineRunner.cpp
  547. ../source/backend/plugin/CarlaPlugin.cpp
  548. ../source/backend/plugin/CarlaPluginBridge.cpp
  549. ../source/backend/plugin/CarlaPluginInternal.cpp
  550. ../source/backend/plugin/CarlaPluginAU.cpp
  551. ../source/backend/plugin/CarlaPluginCLAP.cpp
  552. ../source/backend/plugin/CarlaPluginFluidSynth.cpp
  553. ../source/backend/plugin/CarlaPluginJuce.cpp
  554. ../source/backend/plugin/CarlaPluginJSFX.cpp
  555. ../source/backend/plugin/CarlaPluginLADSPADSSI.cpp
  556. ../source/backend/plugin/CarlaPluginLV2.cpp
  557. ../source/backend/plugin/CarlaPluginNative.cpp
  558. ../source/backend/plugin/CarlaPluginSFZero.cpp
  559. ../source/backend/plugin/CarlaPluginVST2.cpp
  560. ../source/backend/plugin/CarlaPluginVST3.cpp
  561. $<$<BOOL:${CARLA_USE_JACK}>:../source/backend/engine/CarlaEngineJack.cpp>
  562. $<$<BOOL:${CARLA_USE_JACK}>:../source/backend/plugin/CarlaPluginJack.cpp>
  563. )
  564. #######################################################################################################################
  565. # carla discovery
  566. add_executable(carla-discovery-native)
  567. set_common_target_properties(carla-discovery-native)
  568. target_include_directories(carla-discovery-native
  569. PRIVATE
  570. ../source/backend
  571. ../source/includes
  572. ../source/modules
  573. ../source/utils
  574. )
  575. target_link_libraries(carla-discovery-native
  576. PRIVATE
  577. carla-lilv
  578. carla-water-files
  579. carla-ysfx
  580. PkgConfig::FLUIDSYNTH
  581. ${CMAKE_THREAD_LIBS_INIT}
  582. )
  583. target_sources(carla-discovery-native
  584. PRIVATE
  585. ../source/discovery/carla-discovery.cpp
  586. )
  587. #######################################################################################################################
  588. # carla standalone
  589. add_library(carla-standalone SHARED)
  590. add_library(carla::standalone ALIAS carla-standalone)
  591. set_common_target_properties(carla-standalone)
  592. set_target_properties(carla-standalone
  593. PROPERTIES
  594. OUTPUT_NAME carla_standalone2
  595. )
  596. target_compile_definitions(carla-standalone
  597. PRIVATE
  598. CARLA_LIB_EXT="${CMAKE_SHARED_LIBRARY_SUFFIX}"
  599. )
  600. # FIXME
  601. target_compile_options(carla-standalone
  602. PRIVATE
  603. $<$<C_COMPILER_ID:AppleClang>:-Wno-unused-but-set-variable>
  604. $<$<C_COMPILER_ID:GNU>:-Wno-format-truncation>
  605. $<$<C_COMPILER_ID:GNU>:-Wno-stringop-overflow>
  606. $<$<C_COMPILER_ID:GNU>:-Wno-error=cpp>
  607. $<$<STREQUAL:${CMAKE_C_COMPILER_FRONTEND_VARIANT},GNU>:-Wno-unused-parameter>
  608. )
  609. target_include_directories(carla-standalone
  610. PRIVATE
  611. ../source
  612. ../source/backend
  613. ../source/includes
  614. ../source/modules
  615. ../source/utils
  616. )
  617. target_link_libraries(carla-standalone
  618. PRIVATE
  619. carla-jackbridge
  620. carla-lilv
  621. carla-native-plugins
  622. carla-rtmempool
  623. carla-sfzero
  624. carla-water
  625. carla-ysfx
  626. carla-zita-resampler
  627. PkgConfig::FLUIDSYNTH
  628. PkgConfig::LIBLO
  629. PkgConfig::LIBMAGIC
  630. PkgConfig::X11
  631. ${CMAKE_THREAD_LIBS_INIT}
  632. )
  633. target_sources(carla-standalone
  634. PRIVATE
  635. ../source/backend/CarlaStandalone.cpp
  636. ../source/backend/CarlaStandaloneNSM.cpp
  637. ../source/backend/engine/CarlaEngine.cpp
  638. ../source/backend/engine/CarlaEngineClient.cpp
  639. ../source/backend/engine/CarlaEngineDummy.cpp
  640. ../source/backend/engine/CarlaEngineData.cpp
  641. ../source/backend/engine/CarlaEngineGraph.cpp
  642. ../source/backend/engine/CarlaEngineInternal.cpp
  643. ../source/backend/engine/CarlaEngineNative.cpp
  644. ../source/backend/engine/CarlaEngineOsc.cpp
  645. ../source/backend/engine/CarlaEngineOscHandlers.cpp
  646. ../source/backend/engine/CarlaEngineOscSend.cpp
  647. ../source/backend/engine/CarlaEnginePorts.cpp
  648. ../source/backend/engine/CarlaEngineRunner.cpp
  649. ../source/backend/plugin/CarlaPlugin.cpp
  650. ../source/backend/plugin/CarlaPluginBridge.cpp
  651. ../source/backend/plugin/CarlaPluginInternal.cpp
  652. ../source/backend/plugin/CarlaPluginAU.cpp
  653. ../source/backend/plugin/CarlaPluginCLAP.cpp
  654. ../source/backend/plugin/CarlaPluginFluidSynth.cpp
  655. ../source/backend/plugin/CarlaPluginJuce.cpp
  656. ../source/backend/plugin/CarlaPluginJSFX.cpp
  657. ../source/backend/plugin/CarlaPluginLADSPADSSI.cpp
  658. ../source/backend/plugin/CarlaPluginLV2.cpp
  659. ../source/backend/plugin/CarlaPluginNative.cpp
  660. ../source/backend/plugin/CarlaPluginSFZero.cpp
  661. ../source/backend/plugin/CarlaPluginVST2.cpp
  662. ../source/backend/plugin/CarlaPluginVST3.cpp
  663. $<$<BOOL:${CARLA_USE_JACK}>:../source/backend/engine/CarlaEngineJack.cpp>
  664. $<$<BOOL:${CARLA_USE_JACK}>:../source/backend/plugin/CarlaPluginJack.cpp>
  665. )
  666. #######################################################################################################################
  667. # carla utils
  668. add_library(carla-utils SHARED)
  669. add_library(carla::utils ALIAS carla-utils)
  670. set_common_target_properties(carla-utils)
  671. set_target_properties(carla-standalone
  672. PROPERTIES
  673. OUTPUT_NAME carla_utils
  674. )
  675. target_include_directories(carla-utils
  676. PRIVATE
  677. ../source
  678. ../source/backend
  679. ../source/includes
  680. ../source/modules
  681. ../source/utils
  682. )
  683. target_link_libraries(carla-utils
  684. PRIVATE
  685. carla-jackbridge
  686. carla-lilv
  687. carla-water-files
  688. carla-ysfx
  689. PkgConfig::FLUIDSYNTH
  690. PkgConfig::X11
  691. ${CMAKE_THREAD_LIBS_INIT}
  692. )
  693. target_sources(carla-utils
  694. PRIVATE
  695. ../source/backend/utils/CachedPlugins.cpp
  696. ../source/backend/utils/CarlaUtils.cpp
  697. ../source/backend/utils/Information.cpp
  698. ../source/backend/utils/JUCE.cpp
  699. ../source/backend/utils/PipeClient.cpp
  700. ../source/backend/utils/PluginDiscovery.cpp
  701. ../source/backend/utils/System.cpp
  702. ../source/backend/utils/Windows.cpp
  703. )
  704. #######################################################################################################################
  705. if(APPLE)
  706. set_source_files_properties(
  707. ../source/backend/CarlaStandalone.cpp
  708. ../source/backend/plugin/CarlaPluginCLAP.cpp
  709. ../source/backend/plugin/CarlaPluginVST2.cpp
  710. ../source/backend/plugin/CarlaPluginVST3.cpp
  711. ../source/backend/utils/CarlaUtils.cpp
  712. ../source/backend/utils/Windows.cpp
  713. ../source/bridges-plugin/CarlaBridgePlugin.cpp
  714. ../source/discovery/carla-discovery.cpp
  715. ../source/modules/water/water.cpp
  716. ../source/modules/water/water.files.cpp
  717. PROPERTIES COMPILE_FLAGS -ObjC++)
  718. endif()
  719. #######################################################################################################################