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.

836 lines
23KB

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