1 #checking include/library paths
2 message(STATUS "Checking Include Path" $ENV{CMAKE_INCLUDE_PATH} ${CMAKE_INCLUDE_PATH})
3 message(STATUS "Checking Library Path" $ENV{CMAKE_LIBRARY_PATH} ${CMAKE_LIBRARY_PATH})
6 include(CheckFunctionExists)
7 include(CheckIncludeFile)
8 include(CheckCXXSourceCompiles)
9 include(CheckCXXCompilerFlag)
10 if(NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows"))
11 find_package(PkgConfig)
13 find_package(ZLIB REQUIRED)
15 find_package(Threads REQUIRED)
20 find_package(OpenGL) #for FLTK
22 if(PKG_CONFIG_FOUND AND NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows"))
23 message("Looking For pkg config modules")
24 pkg_check_modules(JACK jack)
25 pkg_check_modules(PORTAUDIO portaudio-2.0>=19)
26 set(FLTK_SKIP_OPENGL true)
27 pkg_check_modules(NTK ntk)
28 pkg_check_modules(NTK_IMAGES ntk_images)
30 pkg_check_modules(FFTW3F REQUIRED fftw3f)
31 pkg_check_modules(MXML REQUIRED mxml)
33 pkg_search_module(LASH lash-1.0)
34 mark_as_advanced(LASH_LIBRARIES)
35 pkg_search_module(DSSI dssi>=0.9.0)
36 mark_as_advanced(DSSI_LIBRARIES)
37 pkg_search_module(LIBLO liblo>=0.26 REQUIRED)
38 mark_as_advanced(LIBLO_LIBRARIES)
40 find_package(FFTW3F REQUIRED)
41 find_package(MXML REQUIRED)
42 find_package(LIBLO REQUIRED)
43 find_package(PORTAUDIO)
46 CHECK_FUNCTION_EXISTS(sched_setscheduler HAVE_SCHEDULER)
47 set(CMAKE_REQUIRED_FLAGS "-std=c++11")
48 CHECK_CXX_SOURCE_COMPILES(
50 #if ATOMIC_INT_LOCK_FREE<2
51 #error unreliable atomics
53 int main(){return 0;}" HAVE_ASYNC)
55 check_include_file_cxx(complex HAVE_CPP_STD_COMPLEX)
57 find_library(HAVE_LIBRT rt)
59 set(CMAKE_REQUIRED_FLAGS "")
62 CHECK_CXX_SOURCE_COMPILES(
64 __asm__ __volatile__ (\"fistpl 0\");
65 return 0;}" HAVE_X86_FISTPL)
67 ######### Settings ###########
68 # NOTE: These cache variables should normally not be changed in this
69 # file, but either in in CMakeCache.txt before compile, or by passing
70 # parameters directly into cmake using the -D flag.
72 SET (GuiModule ntk CACHE STRING "GUI module, either fltk, ntk, zest, or off")
74 SET (GuiModule fltk CACHE STRING "GUI module, either fltk, ntk, zest, or off")
76 SET (GuiModule off CACHE STRING "GUI module, either fltk, ntk, zest, or off")
78 SET (CompileTests ON CACHE BOOL "whether tests should be compiled in or not")
79 SET (AlsaEnable ${ALSA_FOUND} CACHE BOOL
80 "Enable support for Advanced Linux Sound Architecture")
81 SET (JackEnable ${JACK_FOUND} CACHE BOOL
82 "Enable support for JACK Audio Connection toolKit")
83 SET (OssEnable ${OSS_FOUND} CACHE BOOL
84 "Enable support for Open Sound System")
85 SET (PaEnable ${PORTAUDIO_FOUND} CACHE BOOL
86 "Enable support for Port Audio System")
87 SET (SndioEnable ${SNDIO_FOUND} CACHE BOOL
88 "Enable support for Sndio System")
89 SET (LashEnable ${LASH_FOUND} CACHE BOOL
90 "Enable LASH Audio Session Handler")
91 SET (DssiEnable ${DSSI_FOUND} CACHE BOOL
92 "Enable DSSI Plugin compilation")
93 SET (NoNeonPlease False CACHE BOOL
94 "Workaround For Broken Neon Detection")
95 SET (PluginLibDir "lib" CACHE STRING
96 "Install directory for plugin libraries PREFIX/PLUGIN_LIB_DIR/{lv2,vst}")
97 SET (DemoMode FALSE CACHE BOOL "Enable 10 minute silence")
98 SET (PluginEnable TRUE CACHE BOOL "Enable Plugins")
99 SET (ZynFusionDir "" CACHE STRING "Developers only: zest binary's dir; useful if fusion is not system-installed.")
100 mark_as_advanced(FORCE ZynFusionDir)
102 # Now, handle the incoming settings and set define flags/variables based
105 # Add version information
106 add_definitions(-DVERSION="${VERSION}")
107 if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
108 add_definitions(-static)
111 if(HAVE_SCHEDULER AND (NOT "Darwin" STREQUAL ${CMAKE_SYSTEM_NAME}))
112 # Add scheduler function existence info (OSX compatibility)
113 add_definitions(-DHAVE_SCHEDULER=${HAVE_SCHEDULER})
117 add_definitions(-DHAVE_ASYNC=1)
119 add_definitions(-DHAVE_ASYNC=0)
122 if(HAVE_CPP_STD_COMPLEX)
123 add_definitions(-DHAVE_CPP_STD_COMPLEX=1)
127 add_definitions(-DDEMO_VERSION=1)
131 # Give a good guess on the best Input/Output default backends
133 SET (DefaultOutput jack CACHE STRING
134 "Default Output module: [null, alsa, oss, jack, portaudio]")
135 # Override with perhaps more helpful midi backends
137 SET (DefaultInput alsa CACHE STRING
138 "Default Input module: [null, alsa, oss, jack]")
140 SET (DefaultInput oss CACHE STRING
141 "Default Input module: [null, alsa, oss, jack]")
143 SET (DefaultInput jack CACHE STRING
144 "Default Input module: [null, alsa, oss, jack]")
147 SET (DefaultOutput alsa CACHE STRING
148 "Default Output module: [null, alsa, oss, jack, portaudio]")
149 SET (DefaultInput alsa CACHE STRING
150 "Default Input module: [null, alsa, oss, jack]")
152 SET (DefaultOutput oss CACHE STRING
153 "Default Output module: [null, alsa, oss, jack, portaudio]")
154 SET (DefaultInput oss CACHE STRING
155 "Default Input module: [null, alsa, oss, jack]")
157 SET (DefaultOutput pa CACHE STRING
158 "Default Output module: [null, alsa, oss, jack, portaudio]")
159 SET (DefaultInput null CACHE STRING
160 "Default Input module: [null, alsa, oss, jack]")
162 SET (DefaultOutput sndio CACHE STRING
163 "Default Output module: [null, alsa, oss, jack, portaudio, sndio]")
164 SET (DefaultInput sndio CACHE STRING
165 "Default Input module: [null, alsa, oss, jack, sndio]")
167 SET (DefaultOutput null CACHE STRING
168 "Default Output module: [null, alsa, oss, jack, portaudio]")
169 SET (DefaultInput null CACHE STRING
170 "Default Input module: [null, alsa, oss, jack]")
175 if(GuiModule STREQUAL ntk AND NTK_FOUND)
177 elseif(GuiModule STREQUAL fltk AND FLTK_FOUND)
179 elseif(GuiModule STREQUAL zest)
181 elseif(GuiModule STREQUAL off)
182 add_definitions(-DDISABLE_GUI)
184 set (GuiModule off CACHE STRING "GUI module, either fltk, ntk, zest, or off")
185 add_definitions(-DDISABLE_GUI)
186 message(STATUS "GUI module defaulting to off")
191 option (BuildForAMD_X86_64 "Build for AMD x86_64 system" OFF)
192 option (BuildForCore2_X86_64 "Build for Intel Core2 x86_64 system" OFF)
193 option (BuildForDebug "Include gdb debugging support" OFF)
194 option (ExtendedWarnings "Enable all useful warnings" OFF)
195 option (IncludeWhatYouUse "Check for useless includes" OFF)
196 mark_as_advanced(IncludeWhatYouUse)
198 set(CMAKE_BUILD_TYPE "Release")
200 set (BuildOptions_ExtendedWarnings "")
201 if (ExtendedWarnings)
202 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
203 # The following generates a list of warning exceptions
204 # (after it enables all warnings).
205 # This is for developers who want to make sure they really
206 # see all possible warnings, with a few exceptions that don't
207 # make sense in this code base.
208 # You can remove those exceptions if they don't complain too
209 # often about the code base. If you want to add exceptions,
210 # be VERY CAREFUL, ask the project maintainers for
212 set (BuildOptions_ExtendedWarnings_List
213 "-Wall" "-Wextra" "-Weverything" # start with really everything
214 "-Wno-c++98-compat" "-Wno-c++98-compat-extra-semi" "-Wno-c++98-compat-pedantic" # C++11 is a zyn build requirement
215 "-Wno-cast-align" # not relevant for our case
216 "-Wno-double-promotion" # Used too often to fix
217 "-Wno-old-style-cast" # forces you to use static_cast<> etc everywhere! too many errors
218 "-Wno-padded" # this tells you to realign your structs to have better memory management
219 "-Wno-zero-as-null-pointer-constant" # wants you to use nullptr in the whole code base
220 "-Wno-implicit-int-conversion" # too often to fix
221 "-Wno-extra-semi" # one semicolon more than useful - no danger to disable this
222 "-Wno-vla-extension" "-Wno-vla" # rtosc currently heavily uses them, and they are supported by our CI
223 "-Wno-exit-time-destructors" "-Wno-global-constructors" # used too often in rtosc
224 "-Wno-gnu-zero-variadic-macro-arguments" # used too often in zyn
225 "-Wno-shadow" "-Wno-shadow-field" # used too often in zyn
226 "-Wno-cast-align" # used too often in zyn
227 "-Wno-missing-prototypes" # used too often in zyn
228 "-Wno-sign-conversion" # used too often in zyn
229 "-Wno-float-equal" # can be disturbing in some cases
230 "-Wno-switch-enum" # used too often in zyn
232 STRING(REPLACE ";" " " BuildOptions_ExtendedWarnings "${BuildOptions_ExtendedWarnings_List}")
233 MESSAGE(STATUS "Using extended Warning options: ${BuildOptions_ExtendedWarnings}")
235 MESSAGE(WARNING "\"ExtendedWarnings\" selected, but this is only supported for clang - ignoring")
239 set (BuildOptions_x86_64AMD
240 "-march=athlon64 -m64 -Wall -Wno-unused-parameter"
241 CACHE STRING "X86_64 compiler options"
244 set (BuildOptions_X86_64Core2
245 "-march=core2 -m64 -Wall -Wno-unused-parameter"
246 CACHE STRING "X86_64 compiler options"
249 set (BuildOptions_NEON
250 "-march=armv7-a -mfloat-abi=hard -mfpu=neon -mcpu=cortex-a9 -mtune=cortex-a9 -pipe -mvectorize-with-neon-quad -funsafe-loop-optimizations"
251 CACHE STRING "Cortex_a9 compiler options"
254 check_cxx_compiler_flag("${BuildOptions_NEON} -Werror" SUPPORT_NEON)
256 set (BuildOptions_SSE
257 "-msse -msse2 -mfpmath=sse"
258 CACHE STRING "SSE compiler options"
261 check_cxx_compiler_flag("${BuildOptions_SSE} -Werror" SUPPORT_SSE)
263 set (BuildOptionsBasic
264 "-std=c++11 -Wno-unused-parameter -O3 -ffast-math -fomit-frame-pointer"
265 CACHE STRING "basic X86 compiler options"
267 STRING(APPEND BuildOptionsBasic " ${BuildOptions_ExtendedWarnings}")
269 set (BuildOptionsDebug
270 "-std=c++11 -O0 -g3 -ggdb -Wall -Wno-unused-parameter -Wpointer-arith"
271 CACHE STRING "Debug build flags")
272 STRING(APPEND BuildOptionsDebug " ${BuildOptions_ExtendedWarnings}")
274 if(${CMAKE_VERSION} VERSION_LESS "3.3.0")
275 set(IwyuErr "disabled (cmake < 3.3.0)")
277 if(IncludeWhatYouUse)
278 find_program(IwyuPath NAMES include-what-you-use iwyu)
280 set(IwyuErr "package NOT found")
283 set(IwyuErr "disabled (IncludeWhatYouUse=OFF)")
287 ########### Settings dependent code ###########
288 # From here on, the setting variables have been prepared so concentrate
289 # on the actual compiling.
291 # To avoid a conflict if PortAudio v1 is installed, the linker directory
292 # of portaudio must be specified first, so that xxx/lib/portaudio2 is
293 # searched before xxx/lib where PortAudio v1 gets installed.
295 include_directories(${PORTAUDIO_INCLUDE_DIRS})
296 add_definitions(-DPORTAUDIO=1)
297 list(APPEND AUDIO_LIBRARIES ${PORTAUDIO_LIBRARIES})
298 list(APPEND AUDIO_LIBRARY_DIRS ${PORTAUDIO_LIBRARY_DIRS})
302 list(APPEND AUDIO_LIBRARIES ${ASOUND_LIBRARY})
303 list(APPEND AUDIO_LIBRARY_DIRS ${ASOUND_LIBRARY_DIRS})
304 add_definitions(-DALSA=1)
308 list(APPEND AUDIO_LIBRARIES ${JACK_LIBRARIES})
309 list(APPEND AUDIO_LIBRARY_DIRS ${JACK_LIBRARY_DIRS})
310 add_definitions(-DJACK=1)
314 add_definitions(-DOSS=1)
318 list(APPEND AUDIO_LIBRARIES ${SNDIO_LIBRARY})
319 list(APPEND AUDIO_LIBRARY_DIRS ${SNDIO_LIBRARY_DIRS})
320 add_definitions(-DSNDIO=1)
328 include_directories(${LASH_INCLUDE_DIRS})
329 add_definitions(-DLASH=1)
330 list(APPEND AUDIO_LIBRARIES ${LASH_LIBRARIES})
331 list(APPEND AUDIO_LIBRARY_DIRS ${LASH_LIBRARY_DIRS})
332 message(STATUS "Compiling with lash")
335 include_directories(${LIBLO_INCLUDE_DIRS})
336 add_definitions(-DUSE_NSM=1)
337 list(APPEND AUDIO_LIBRARIES ${LIBLO_LIBRARIES})
338 list(APPEND AUDIO_LIBRARY_DIRS ${LIBLO_LIBRARY_DIRS})
339 message(STATUS "Compiling with liblo")
341 # other include directories
342 include_directories(${ZLIB_INCLUDE_DIRS} ${MXML_INCLUDE_DIRS})
343 include_directories(${CMAKE_BINARY_DIR}/src) # for zyn-version.h ...
345 if(NOT ${X11_X11_LIB} STREQUAL "")
346 get_filename_component(X11_LIBRARY_DIRS ${X11_X11_LIB} DIRECTORY)
349 if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
350 add_definitions(-DWIN32)
353 if(${CMAKE_SYSTEM_NAME} STREQUAL "CYGWIN")
354 add_definitions(-D_GNU_SOURCE=1 -D_POSIX_THREAD_PRIO_INHERIT=1)
362 # macro similar to "check_cxx_compiler_flag_extra", however,
363 # it also checks for warnings that are only output if other warnings are active
364 macro (check_cxx_compiler_flag_extra _FLAG _FAILREGEX _RESULT)
365 set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
366 set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
368 check_cxx_source_compiles("int main() { int x; return x; }" ${_RESULT}
369 FAIL_REGEX "unrecognized|option"
372 set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
375 check_cxx_compiler_flag_extra("-Wall -Wextra -Wno-inconsistent-missing-override"
376 "unrecognized|option"
377 COMPILER_SUPPORTS_NO_INCONSISTENT_MISSING_OVERRIDE
379 if(COMPILER_SUPPORTS_NO_INCONSISTENT_MISSING_OVERRIDE)
380 add_definitions(-Wno-inconsistent-missing-override)
383 check_cxx_compiler_flag("-Wall -Wextra -Werror --system-header-prefix='FL/'"
384 COMPILER_SUPPORTS_SYSTEM_HDR_PREFIX)
385 if(COMPILER_SUPPORTS_SYSTEM_HDR_PREFIX)
386 add_definitions(--system-header-prefix="FL/")
390 message(STATUS "Compiling with x86 opcode support")
391 add_definitions(-DASM_F2I_YES)
395 set (CMAKE_BUILD_TYPE "Debug")
396 set (CMAKE_CXX_FLAGS_DEBUG ${BuildOptionsDebug})
397 message (STATUS "Building for ${CMAKE_BUILD_TYPE}, flags: ${CMAKE_CXX_FLAGS_DEBUG}")
399 set (CMAKE_BUILD_TYPE "Release")
401 set (CMAKE_CXX_FLAGS_RELEASE ${BuildOptionsBasic})
403 if (BuildForAMD_X86_64)
404 set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${BuildOptions_x86_64AMD}")
405 endif (BuildForAMD_X86_64)
407 if (BuildForCore2_X86_64)
408 set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${BuildOptions_X86_64Core2}")
409 endif (BuildForCore2_X86_64)
412 set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${BuildOptions_SSE}")
415 if (SUPPORT_NEON AND NOT NoNeonPlease)
416 set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${BuildOptions_NEON}")
417 endif (SUPPORT_NEON AND NOT NoNeonPlease)
419 message (STATUS "Building for ${CMAKE_BUILD_TYPE}, flags: ${CMAKE_CXX_FLAGS_RELEASE}")
420 endif (BuildForDebug)
422 if(NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows"))
423 add_definitions(-fPIC)
427 mark_as_advanced(FORCE FLTK_BASE_LIBRARY)
428 mark_as_advanced(FORCE FLTK_CONFIG_SCRIPT)
429 mark_as_advanced(FORCE FLTK_DIR)
430 mark_as_advanced(FORCE FLTK_FLUID_EXECUTABLE)
431 mark_as_advanced(FORCE FLTK_FORMS_LIBRARY)
432 mark_as_advanced(FORCE FLTK_GL_LIBRARY)
433 mark_as_advanced(FORCE FLTK_IMAGES_LIBRARY)
434 mark_as_advanced(FORCE FLTK_INCLUDE_DIR)
435 mark_as_advanced(FORCE FLTK_MATH_LIBRARY)
439 mark_as_advanced(FORCE NTK_BASE_LIBRARY)
440 mark_as_advanced(FORCE NTK_CONFIG_SCRIPT)
441 mark_as_advanced(FORCE NTK_DIR)
442 mark_as_advanced(FORCE FLTK_FLUID_EXECUTABLE)
443 mark_as_advanced(FORCE NTK_FORMS_LIBRARY)
444 mark_as_advanced(FORCE NTK_GL_LIBRARY)
445 mark_as_advanced(FORCE NTK_IMAGES_LIBRARY)
446 mark_as_advanced(FORCE NTK_INCLUDE_DIR)
447 mark_as_advanced(FORCE NTK_MATH_LIBRARY)
452 find_program (FLTK_CONFIG fltk-config)
454 execute_process (COMMAND ${FLTK_CONFIG} --use-images --ldflags OUTPUT_VARIABLE FLTK_LDFLAGS)
455 string(STRIP "${FLTK_LDFLAGS}" FLTK_LIBRARIES)
458 message(STATUS ${FLTK_LDFLAGS})
461 set(GUI_LIBRARIES zynaddsubfx_gui ${FLTK_LIBRARIES} ${FLTK_LIBRARIES} ${OPENGL_LIBRARIES})
463 add_definitions(-DFLTK_GUI)
464 message(STATUS "Will build FLTK gui")
468 "${CMAKE_CURRENT_SOURCE_DIR}/UI"
469 "${CMAKE_CURRENT_BINARY_DIR}/UI"
477 find_program(FLTK_FLUID_EXECUTABLE ntk-fluid)
479 message(STATUS ${NTK_LDFLAGS} ${NTK_IMAGES_LDFLAGS})
481 set(GUI_LIBRARIES zynaddsubfx_gui ${NTK_IMAGES_LIBRARIES} ${NTK_LIBRARIES} ${OPENGL_LIBRARIES})
483 if(X11_FOUND AND X11_Xpm_FOUND)
484 set(GUI_LIBRARIES ${GUI_LIBRARIES} ${X11_LIBRARIES} -lXpm)
487 add_definitions(-DNTK_GUI)
489 message(STATUS "Will build NTK gui")
491 include_directories(BEFORE
493 "${CMAKE_CURRENT_SOURCE_DIR}/UI"
494 "${CMAKE_CURRENT_BINARY_DIR}/UI"
501 add_definitions(-DDGL_OPENGL=1)
502 add_definitions(-DHAVE_DGL)
503 add_definitions(-DZEST_GUI)
506 if(NOT FltkGui AND NOT NtkGui)
507 set(NSM_WORKAROUND UI/NSM.C UI/NSM/Client.C)
508 add_library(zynaddsubfx_gui_bridge STATIC UI/ConnectionDummy.cpp ${NSM_WORKAROUND})
509 add_definitions(-DNO_UI=1)
512 ########### General section ##############
513 # Following this should be only general compilation code, and no mention
514 # of module-specific variables
516 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zyn-version.h.in
517 ${CMAKE_CURRENT_BINARY_DIR}/zyn-version.h)
518 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zyn-config.h.in
519 ${CMAKE_CURRENT_BINARY_DIR}/zyn-config.h)
521 link_directories(${AUDIO_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIRS} ${FFTW3F_LIBRARY_DIRS} ${MXML_LIBRARY_DIRS} ${FLTK_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${X11_LIBRARY_DIRS})
524 ${CMAKE_CURRENT_SOURCE_DIR}
525 ${CMAKE_CURRENT_BINARY_DIR}
538 add_subdirectory(Misc)
539 add_subdirectory(Synth)
540 add_subdirectory(Effects)
541 add_subdirectory(Params)
542 add_subdirectory(DSP)
543 add_subdirectory(Nio)
545 add_subdirectory(Plugin)
548 add_library(zynaddsubfx_core STATIC
552 Containers/ScratchString.cpp
553 Containers/NotePool.cpp
554 Containers/MultiPseudoStack.cpp
555 ${zynaddsubfx_dsp_SRCS}
556 ${zynaddsubfx_effect_SRCS}
557 ${zynaddsubfx_misc_SRCS}
558 ${zynaddsubfx_params_SRCS}
559 ${zynaddsubfx_synth_SRCS}
562 if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
563 set(PTHREAD_LIBRARY winpthread)
564 set(PLATFORM_LIBRARIES ws2_32
568 "-static" winpthread)
570 set(PTHREAD_LIBRARY pthread)
573 set(PLATFORM_LIBRARIES rt)
575 set(PTHREAD_LIBRARY pthread)
579 target_link_libraries(zynaddsubfx_core
586 ${RTOSC_CPP_LIBRARIES}
589 target_link_libraries(zynaddsubfx_core
601 message (STATUS "Include what you use: ${IwyuErr}")
603 set(IwyuPathAndOptions
607 set_property(TARGET zynaddsubfx_core PROPERTY CXX_INCLUDE_WHAT_YOU_USE
608 ${IwyuPathAndOptions})
612 add_subdirectory(Tests)
616 add_executable(zynaddsubfx main.cpp)
618 #Warning: the required ordering of these to get proper linking depends upon the
620 target_link_libraries(zynaddsubfx
623 zynaddsubfx_gui_bridge
627 ${PLATFORM_LIBRARIES}
631 add_library(zynaddsubfx_dssi SHARED
632 UI/ConnectionDummy.cpp
633 Output/DSSIaudiooutput.cpp
635 Output/DSSIControl.cpp
637 Output/DSSIControlDescription.cpp
638 Output/DSSIControlDescription.h)
640 target_link_libraries(zynaddsubfx_dssi
644 ${PLATFORM_LIBRARIES}
647 install(TARGETS zynaddsubfx_dssi LIBRARY DESTINATION ${PluginLibDir}/dssi/)
650 install(TARGETS zynaddsubfx
651 RUNTIME DESTINATION bin
654 install(DIRECTORY ../pixmaps DESTINATION share/zynaddsubfx)
660 ##Summarize The Full Configuration
662 message(STATUS "${ColorBold}ZynAddSubFX Build Configuration")
663 message(STATUS "===============================${ColorReset}")
665 message(STATUS "Building on a '${CMAKE_SYSTEM_NAME}' System")
668 macro(package_status foundvar pkg state)#optional color
669 set (extra_macro_args ${ARGN})
670 list(LENGTH extra_macro_args num_extra_args)
671 if (${num_extra_args} GREATER 0)
672 list(GET extra_macro_args 0 color)
675 message(STATUS "${pkg} -- ${Green}${state}${ColorReset}")
677 message(STATUS "${pkg} -- ${color}NOT ${state}${ColorReset}")
681 package_status(PKG_CONFIG_FOUND "PkgConfig" "found" ${Red})
682 package_status(ZLIB_FOUND "zlib " "found" ${Red})
683 package_status(MXML_FOUND "mxml " "found" ${Red})
684 package_status(FFTW3F_FOUND "fftw3f " "found" ${Red})
685 package_status(LIBLO_FOUND "liblo " "found" ${Red})
686 package_status(X11_FOUND "x11 " "found" ${Yellow})
687 package_status(X11_Xpm_FOUND "xpm " "found" ${Yellow})
688 package_status(FLTK_FOUND "fltk " "found" ${Yellow})
689 package_status(NTK_FOUND "ntk " "found" ${Yellow})
690 package_status(OSS_FOUND "OSS " "found" ${Yellow})
691 package_status(ALSA_FOUND "ALSA " "found" ${Yellow})
692 package_status(JACK_FOUND "JACK " "found" ${Yellow})
693 package_status(PORTAUDIO_FOUND "PA " "found" ${Yellow})
694 package_status(SNDIO_FOUND "SNDIO " "found" ${Yellow})
695 package_status(LASH_FOUND "Lash " "found" ${Yellow})
696 package_status(DSSI_FOUND "DSSI " "found" ${Yellow})
697 package_status(LashEnable "Lash " "enabled" ${Yellow})
698 package_status(DssiEnable "DSSI " "enabled" ${Yellow})
699 package_status(CompileTests "tests " "enabled" ${Yellow})
700 package_status(AlsaEnable "ALSA " "enabled" ${Yellow})
701 package_status(JackEnable "JACK " "enabled" ${Yellow})
702 package_status(OssEnable "OSS " "enabled" ${Yellow})
703 package_status(PaEnable "PA " "enabled" ${Yellow})
704 package_status(SndioEnable "SNDIO " "enabled" ${Yellow})
706 package_status(HAVE_ASYNC "c++ async" "usable" ${Yellow})
709 message(STATUS "Link libraries: ${ZLIB_LIBRARY} ${FFTW3F_LIBRARY} ${MXML_LIBRARIES} ${AUDIO_LIBRARIES} ${OS_LIBRARIES}")