4 add_definitions("-DSC_FFT_FFTW")
5 include_directories (${FFTW3F_INCLUDE_DIR})
7 message(SEND_ERROR "Cannot find libfftw3f")
10 if(CMAKE_COMPILER_IS_GNUCXX)
11 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-4096")
12 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer")
15 if (CMAKE_SIZEOF_VOID_P MATCHES "4")
16 # cmpxchg8b is available on all intel apples
17 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686 -msse -msse2 -mfpmath=sse")
20 endif(CMAKE_COMPILER_IS_GNUCXX)
23 set_property(DIRECTORY .
25 PROPERTY COMPILE_DEFINITIONS_DEBUG NOVA_MEMORY_DEBUGGING)
30 include_directories(${CMAKE_SOURCE_DIR}/external_libraries/boost_endian
31 ${CMAKE_SOURCE_DIR}/external_libraries/boost_move
32 ${CMAKE_SOURCE_DIR}/external_libraries/oscpack
33 ${CMAKE_SOURCE_DIR}/external_libraries/TLSF-2.4.6/src
37 include_directories(${CMAKE_SOURCE_DIR}/include/plugin_interface
38 ${CMAKE_SOURCE_DIR}/include/server
39 ${CMAKE_SOURCE_DIR}/include/common
44 sc/sc_synth_prototype.cpp
46 sc/sc_plugin_interface.cpp
49 sc/sc_ugen_factory.cpp
51 ${CMAKE_SOURCE_DIR}/common/SC_fftlib.cpp
52 ${CMAKE_SOURCE_DIR}/common/SC_DirUtils.cpp
53 ${CMAKE_SOURCE_DIR}/common/SC_StandAloneInfo_Darwin.cpp
54 server/buffer_manager.cpp
55 server/dsp_context.cpp
56 server/memory_pool.cpp
59 server/server_args.cpp
63 CREATE_FINAL_FILE(libsupernova_final.cpp ${libsupernova_src})
64 add_library (libsupernova STATIC libsupernova_final.cpp)
66 add_library (libsupernova STATIC ${libsupernova_src})
69 set_property(TARGET libsupernova
70 PROPERTY OUTPUT_NAME supernova)
72 add_executable(supernova server/main.cpp)
74 set_property(TARGET libsupernova supernova
76 PROPERTY COMPILE_DEFINITIONS SUPERNOVA)
78 find_library(DL NAMES dl)
80 set_property(TARGET libsupernova
82 PROPERTY COMPILE_DEFINITIONS DLOPEN)
83 target_link_libraries(libsupernova ${DL})
86 find_library(JACK NAMES jack)
88 set_property(TARGET libsupernova supernova
90 PROPERTY COMPILE_DEFINITIONS JACK_BACKEND)
91 target_link_libraries(libsupernova ${JACK})
94 find_library(SNDFILE NAMES sndfile)
96 message(SEND_ERROR "Cannot find libsndfile")
98 target_link_libraries(libsupernova ${SNDFILE})
102 target_link_libraries(libsupernova ${FFTW3F_LIBRARY})
105 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
106 target_link_libraries(libsupernova rt)
109 target_link_libraries(libsupernova oscpack tlsf boost_thread boost_system boost_filesystem boost_program_options ${PTHREADS_LIBRARIES})
110 target_link_libraries(supernova libsupernova)
113 # determines the app name and app install location (scappbundlename, scappdir):
114 include (${CMAKE_SOURCE_DIR}/cmake_modules/MacAppFolder.cmake)
116 install(TARGETS supernova
117 DESTINATION ${scappauxresourcesdir}
118 PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE OWNER_WRITE)
121 install(TARGETS supernova
123 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
127 set_property(TARGET supernova libsupernova
128 APPEND PROPERTY COMPILE_FLAGS "-flto -flto-report")
130 set_property(TARGET supernova libsupernova
131 APPEND PROPERTY LINK_FLAGS "-flto -flto-report -fwhole-program")
135 target_link_libraries(supernova "-framework vecLib")
136 target_link_libraries(supernova "-framework CoreAudio -framework CoreServices")