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.

823 lines
22KB

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