2016-05-25 02:00:22 +00:00
|
|
|
project(amuse)
|
|
|
|
|
|
|
|
if(EXISTS boo)
|
|
|
|
add_subdirectory(boo)
|
|
|
|
endif()
|
|
|
|
|
2016-05-03 01:16:26 +00:00
|
|
|
set(SOURCES
|
|
|
|
lib/AudioGroup.cpp
|
|
|
|
lib/AudioGroupData.cpp
|
|
|
|
lib/AudioGroupPool.cpp
|
|
|
|
lib/AudioGroupProject.cpp
|
|
|
|
lib/AudioGroupSampleDirectory.cpp
|
|
|
|
lib/Emitter.cpp
|
|
|
|
lib/Engine.cpp
|
|
|
|
lib/Envelope.cpp
|
|
|
|
lib/Listener.cpp
|
|
|
|
lib/Sequencer.cpp
|
|
|
|
lib/SoundMacroState.cpp
|
2016-05-19 02:19:43 +00:00
|
|
|
lib/SongState.cpp
|
2016-05-07 22:10:57 +00:00
|
|
|
lib/Voice.cpp
|
2016-05-22 08:35:55 +00:00
|
|
|
lib/VolumeLUT.cpp
|
2016-05-07 22:10:57 +00:00
|
|
|
lib/Submix.cpp
|
|
|
|
lib/EffectBase.cpp
|
2016-05-13 01:46:41 +00:00
|
|
|
lib/EffectReverb.cpp
|
2016-05-07 22:10:57 +00:00
|
|
|
lib/EffectChorus.cpp
|
2016-05-11 04:48:08 +00:00
|
|
|
lib/EffectDelay.cpp
|
|
|
|
lib/SurroundProfiles.cpp
|
2016-05-27 00:56:18 +00:00
|
|
|
lib/ContainerRegistry.cpp
|
2016-05-11 04:48:08 +00:00
|
|
|
lib/dsp.c)
|
2016-05-03 01:16:26 +00:00
|
|
|
|
|
|
|
set(HEADERS
|
|
|
|
include/amuse/AudioGroup.hpp
|
|
|
|
include/amuse/AudioGroupData.hpp
|
|
|
|
include/amuse/AudioGroupPool.hpp
|
|
|
|
include/amuse/AudioGroupProject.hpp
|
|
|
|
include/amuse/AudioGroupSampleDirectory.hpp
|
|
|
|
include/amuse/Emitter.hpp
|
|
|
|
include/amuse/Engine.hpp
|
|
|
|
include/amuse/Entity.hpp
|
|
|
|
include/amuse/Envelope.hpp
|
|
|
|
include/amuse/Listener.hpp
|
|
|
|
include/amuse/Sequencer.hpp
|
|
|
|
include/amuse/SoundMacroState.hpp
|
2016-05-19 02:19:43 +00:00
|
|
|
include/amuse/SongState.hpp
|
2016-05-03 01:16:26 +00:00
|
|
|
include/amuse/Voice.hpp
|
2016-05-07 22:10:57 +00:00
|
|
|
include/amuse/Submix.hpp
|
|
|
|
include/amuse/IBackendSubmix.hpp
|
2016-05-03 01:16:26 +00:00
|
|
|
include/amuse/IBackendVoice.hpp
|
|
|
|
include/amuse/IBackendVoiceAllocator.hpp
|
2016-05-07 22:10:57 +00:00
|
|
|
include/amuse/EffectBase.hpp
|
2016-05-13 01:46:41 +00:00
|
|
|
include/amuse/EffectReverb.hpp
|
2016-05-07 22:10:57 +00:00
|
|
|
include/amuse/EffectChorus.hpp
|
|
|
|
include/amuse/EffectDelay.hpp
|
2016-05-11 04:48:08 +00:00
|
|
|
include/amuse/SurroundProfiles.hpp
|
2016-05-27 00:56:18 +00:00
|
|
|
include/amuse/ContainerRegistry.hpp
|
2016-05-03 01:16:26 +00:00
|
|
|
include/amuse/Common.hpp
|
2016-05-11 04:48:08 +00:00
|
|
|
include/amuse/amuse.hpp
|
|
|
|
include/amuse/dsp.h)
|
2016-05-03 01:16:26 +00:00
|
|
|
|
|
|
|
unset(EXTRAS)
|
|
|
|
if(TARGET boo)
|
2016-05-25 02:00:22 +00:00
|
|
|
include_directories(${BOO_INCLUDE_DIR} ${BOO_INCLUDE_DIR}/../lib ${BOO_INCLUDE_DIR}/../soxr/src
|
|
|
|
${LOGVISOR_INCLUDE_DIR} ${ATHENA_INCLUDE_DIR})
|
2016-05-03 01:16:26 +00:00
|
|
|
list(APPEND EXTRAS lib/BooBackend.cpp include/amuse/BooBackend.hpp)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include_directories(include)
|
|
|
|
set(AMUSE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE PATH "amuse include path" FORCE)
|
|
|
|
|
|
|
|
add_library(amuse
|
|
|
|
${SOURCES}
|
|
|
|
${HEADERS}
|
|
|
|
${EXTRAS})
|
2016-05-09 07:22:58 +00:00
|
|
|
|
|
|
|
if(TARGET boo)
|
2016-05-25 02:00:22 +00:00
|
|
|
# AudioUnit Target
|
|
|
|
if (APPLE AND (NOT CMAKE_OSX_DEPLOYMENT_TARGET OR CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER 10.10))
|
|
|
|
set(APPLE_DEV_ID "" CACHE STRING "Mac Developer ID string 'Mac Developer: John Smith (XXXXXXXXXX)'")
|
|
|
|
set(APPLE_TEAM_ID "" CACHE STRING "Team ID string provisioned within Xcode / Apple's portal")
|
|
|
|
find_library(AVFOUNDATION_LIBRARY AVFoundation)
|
|
|
|
find_library(AUDIOUNIT_LIBRARY AudioUnit)
|
|
|
|
find_library(COREAUDIOKIT_LIBRARY CoreAudioKit)
|
|
|
|
if (NOT (AUDIOUNIT_LIBRARY STREQUAL AUDIOUNIT_LIBRARY-NOTFOUND))
|
|
|
|
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}")
|
|
|
|
|
2016-05-26 01:28:50 +00:00
|
|
|
# Search for provision profile to make AudioUnit extension on OS X
|
2016-05-25 02:00:22 +00:00
|
|
|
unset(PROV_PROFILE)
|
|
|
|
file(GLOB PROV_FILES "$ENV{HOME}/Library/MobileDevice/Provisioning Profiles/*.provisionprofile")
|
|
|
|
foreach(FILE ${PROV_FILES})
|
|
|
|
file(STRINGS "${FILE}" NAME REGEX ${APPLE_TEAM_ID})
|
|
|
|
if(NAME)
|
|
|
|
set(PROV_PROFILE "${FILE}")
|
|
|
|
break()
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
if(EXISTS "${PROV_PROFILE}")
|
|
|
|
|
|
|
|
# Extension App
|
|
|
|
add_executable(amuse-au MACOSX_BUNDLE AudioUnit/AudioUnitBackend.hpp AudioUnit/AudioUnitBackend.mm
|
2016-05-26 01:28:50 +00:00
|
|
|
AudioUnit/AudioUnitViewController.hpp AudioUnit/AudioUnitViewController.mm
|
|
|
|
AudioUnit/AudioGroupFilePresenter.hpp AudioUnit/AudioGroupFilePresenter.mm)
|
2016-05-25 02:00:22 +00:00
|
|
|
|
|
|
|
set(APPLE_BUNDLE_ID "io.github.axiodl.Amuse.AudioUnit")
|
2016-05-26 01:28:50 +00:00
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/AudioUnit/AmuseExtension.entitlements.in
|
2016-05-25 02:00:22 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/AmuseExtension.entitlements)
|
|
|
|
|
|
|
|
target_link_libraries(amuse-au amuse boo soxr ${AUDIOUNIT_LIBRARY} ${COREAUDIOKIT_LIBRARY}
|
2016-05-26 01:28:50 +00:00
|
|
|
${AVFOUNDATION_LIBRARY} ${BOO_SYS_LIBS} logvisor athena-core)
|
2016-05-25 02:00:22 +00:00
|
|
|
set_target_properties(amuse-au PROPERTIES
|
|
|
|
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/AudioUnit/ExtensionInfo.plist"
|
|
|
|
BUNDLE_EXTENSION "appex" BUNDLE TRUE
|
2016-05-25 05:49:48 +00:00
|
|
|
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_BINARY_DIR}/AmuseExtension.entitlements"
|
|
|
|
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "${APPLE_DEV_ID}"
|
2016-05-25 02:00:22 +00:00
|
|
|
LINK_FLAGS "-e _NSExtensionMain -fobjc-arc -fobjc-link-runtime -fapplication-extension")
|
|
|
|
|
2016-05-25 05:49:48 +00:00
|
|
|
|
|
|
|
# Containing App
|
2016-05-26 01:28:50 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/AmuseContainerMainMenu.nib
|
|
|
|
COMMAND ibtool --errors --warnings --notices --module amuse_au_container --auto-activate-custom-fonts
|
|
|
|
--target-device mac --minimum-deployment-target 10.11 --output-format human-readable-text --compile
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/AmuseContainerMainMenu.nib
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/AudioUnit/AmuseContainerMainMenu.xib
|
|
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/AudioUnit/AmuseContainerMainMenu.xib
|
|
|
|
)
|
2016-05-25 05:49:48 +00:00
|
|
|
add_executable(amuse-au-container MACOSX_BUNDLE AudioUnit/AmuseContainingApp.mm
|
|
|
|
AudioUnit/AudioUnitBackend.hpp AudioUnit/AudioUnitBackend.mm
|
2016-05-26 01:28:50 +00:00
|
|
|
AudioUnit/AudioUnitViewController.hpp AudioUnit/AudioUnitViewController.mm
|
|
|
|
AudioUnit/AudioGroupFilePresenter.hpp AudioUnit/AudioGroupFilePresenter.mm
|
|
|
|
AmuseContainerMainMenu.nib)
|
2016-05-25 05:49:48 +00:00
|
|
|
set_source_files_properties(AudioUnit/AudioUnitBackend.mm AudioUnit/AudioUnitViewController.mm
|
2016-05-26 01:28:50 +00:00
|
|
|
AudioUnit/AmuseContainingApp.mm AudioUnit/AudioGroupFilePresenter.mm
|
2016-05-25 05:49:48 +00:00
|
|
|
PROPERTIES COMPILE_FLAGS -fobjc-arc)
|
|
|
|
target_link_libraries(amuse-au-container amuse boo soxr ${AUDIOUNIT_LIBRARY} ${COREAUDIOKIT_LIBRARY}
|
2016-05-26 01:28:50 +00:00
|
|
|
${AVFOUNDATION_LIBRARY} ${BOO_SYS_LIBS} logvisor athena-core)
|
2016-05-25 05:49:48 +00:00
|
|
|
|
|
|
|
set(APPLE_BUNDLE_ID "io.github.axiodl.Amuse")
|
2016-05-26 01:28:50 +00:00
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/AudioUnit/AmuseContainer.entitlements.in
|
2016-05-25 05:49:48 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/AmuseContainer.entitlements)
|
|
|
|
|
|
|
|
set_target_properties(amuse-au-container PROPERTIES
|
|
|
|
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/AudioUnit/ContainerInfo.plist"
|
|
|
|
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_BINARY_DIR}/AmuseContainer.entitlements"
|
|
|
|
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "${APPLE_DEV_ID}")
|
|
|
|
|
|
|
|
add_custom_command(TARGET amuse-au POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy "${PROV_PROFILE}" "$<TARGET_FILE_DIR:amuse-au>/../embedded.provisionprofile"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E remove_directory "$<TARGET_FILE_DIR:amuse-au-container>/../PlugIns/amuse-au.appex"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory "$<TARGET_FILE_DIR:amuse-au>/../.."
|
|
|
|
"$<TARGET_FILE_DIR:amuse-au-container>/../PlugIns/amuse-au.appex"
|
|
|
|
COMMAND codesign --force --sign
|
|
|
|
${APPLE_DEV_ID} --entitlements "${CMAKE_CURRENT_BINARY_DIR}/AmuseExtension.entitlements"
|
|
|
|
"$<TARGET_FILE_DIR:amuse-au-container>/../PlugIns/amuse-au.appex"
|
|
|
|
COMMAND codesign --force --sign ${APPLE_DEV_ID}
|
|
|
|
"$<TARGET_FILE_DIR:amuse-au-container>/../.."
|
|
|
|
VERBATIM
|
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_command(TARGET amuse-au-container POST_BUILD
|
2016-05-26 01:28:50 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/AmuseContainerMainMenu.nib"
|
|
|
|
"$<TARGET_FILE_DIR:amuse-au-container>/../Resources/AmuseContainerMainMenu.nib"
|
2016-05-25 05:49:48 +00:00
|
|
|
COMMAND codesign --force --sign
|
|
|
|
${APPLE_DEV_ID} "$<TARGET_FILE_DIR:amuse-au-container>/../.."
|
|
|
|
VERBATIM
|
|
|
|
)
|
2016-05-25 02:00:22 +00:00
|
|
|
|
|
|
|
else()
|
|
|
|
message(WARNING "Unable to find developer provision profile; skipping Amuse-AU")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2016-05-14 04:46:39 +00:00
|
|
|
add_executable(amuseplay WIN32 driver/main.cpp)
|
2016-05-27 05:30:43 +00:00
|
|
|
target_link_libraries(amuseplay amuse boo ${BOO_SYS_LIBS} logvisor athena-core ${ZLIB_LIBRARIES})
|
2016-05-09 07:22:58 +00:00
|
|
|
endif()
|