5 add_definitions("-DSC_FFT_FFTW")
6 include_directories (${FFTW3F_INCLUDE_DIR})
8 message(SEND_ERROR "Cannot find libfftw3f")
13 if(CMAKE_COMPILER_IS_GNUCXX)
14 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-4096")
15 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer")
18 if (CMAKE_SIZEOF_VOID_P MATCHES "4")
19 # cmpxchg8b is available on all intel apples
20 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686 -msse -msse2 -mfpmath=sse")
23 endif(CMAKE_COMPILER_IS_GNUCXX)
26 set_property(DIRECTORY .
28 PROPERTY COMPILE_DEFINITIONS_DEBUG NOVA_MEMORY_DEBUGGING)
33 include_directories(${CMAKE_SOURCE_DIR}/external_libraries/boost_endian
34 ${CMAKE_SOURCE_DIR}/external_libraries/boost_move
35 ${CMAKE_SOURCE_DIR}/external_libraries/oscpack
36 ${CMAKE_SOURCE_DIR}/external_libraries/TLSF-2.4.6/src
40 include_directories(${CMAKE_SOURCE_DIR}/external_libraries/libsndfile)
43 include_directories(${CMAKE_SOURCE_DIR}/include/plugin_interface
44 ${CMAKE_SOURCE_DIR}/include/server
45 ${CMAKE_SOURCE_DIR}/include/common
50 sc/sc_synth_prototype.cpp
52 sc/sc_plugin_interface.cpp
55 sc/sc_ugen_factory.cpp
57 ${CMAKE_SOURCE_DIR}/common/SC_fftlib.cpp
58 ${CMAKE_SOURCE_DIR}/common/SC_DirUtils.cpp
59 ${CMAKE_SOURCE_DIR}/common/SC_StandAloneInfo_Darwin.cpp
60 server/buffer_manager.cpp
61 server/dsp_context.cpp
62 server/memory_pool.cpp
65 server/server_args.cpp
69 CREATE_FINAL_FILE(libsupernova_final.cpp ${libsupernova_src})
70 add_library (libsupernova STATIC libsupernova_final.cpp)
72 add_library (libsupernova STATIC ${libsupernova_src})
75 set_property(TARGET libsupernova
76 PROPERTY OUTPUT_NAME supernova)
78 add_executable(supernova server/main.cpp)
80 set_property(TARGET libsupernova supernova
82 PROPERTY COMPILE_DEFINITIONS SUPERNOVA)
84 find_library(DL NAMES dl)
86 set_property(TARGET libsupernova
88 PROPERTY COMPILE_DEFINITIONS DLOPEN)
89 target_link_libraries(libsupernova ${DL})
93 find_package(Portaudio)
94 if(NOT PORTAUDIO_FOUND)
95 message(FATAL_ERROR "Portaudio missing")
97 add_definitions(-DPORTAUDIO_BACKEND ${PORTAUDIO_DEFINITIONS})
98 include_directories(${PORTAUDIO_INCLUDE_DIRS})
99 target_link_libraries(libsupernova ${PORTAUDIO_LIBRARIES})
101 find_library(JACK NAMES jack)
103 set_property(TARGET libsupernova supernova
105 PROPERTY COMPILE_DEFINITIONS JACK_BACKEND)
106 target_link_libraries(libsupernova ${JACK})
107 include_directories(${JACK_INCLUDE_DIRS})
111 find_package(Sndfile)
112 if (NOT SNDFILE_FOUND)
113 message(SEND_ERROR "Cannot find libsndfile")
115 target_link_libraries(libsupernova ${SNDFILE_LIBRARIES})
116 include_directories(${SNDFILE_INCLUDE_DIR})
120 target_link_libraries(libsupernova ${FFTW3F_LIBRARY})
123 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
124 target_link_libraries(libsupernova rt)
127 target_link_libraries(libsupernova oscpack tlsf boost_thread boost_system boost_filesystem boost_program_options ${PTHREADS_LIBRARIES})
128 target_link_libraries(supernova libsupernova)
131 # determines the app name and app install location (scappbundlename, scappdir):
132 include (${CMAKE_SOURCE_DIR}/cmake_modules/MacAppFolder.cmake)
134 install(TARGETS supernova
135 DESTINATION ${scappauxresourcesdir}
136 PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE OWNER_WRITE)
139 install(TARGETS supernova
141 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
145 set_property(TARGET supernova libsupernova
146 APPEND PROPERTY COMPILE_FLAGS "-flto -flto-report")
148 set_property(TARGET supernova libsupernova
149 APPEND PROPERTY LINK_FLAGS "-flto -flto-report -fwhole-program")
153 target_link_libraries(supernova "-framework vecLib")
154 target_link_libraries(supernova "-framework CoreAudio -framework CoreServices")