amuse/CMakeLists.txt

147 lines
4.3 KiB
CMake
Raw Normal View History

2017-11-14 04:52:03 +00:00
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
project(amuse)
2017-11-13 06:15:33 +00:00
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing")
endif()
2016-07-18 17:52:17 +00:00
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boo AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/athena)
message(STATUS "Preparing standalone build")
add_subdirectory(boo)
2016-07-18 17:52:17 +00:00
add_subdirectory(athena)
include_directories(athena/include)
endif()
atdna(atdna_AudioGroupPool.cpp include/amuse/AudioGroupPool.hpp)
atdna(atdna_AudioGroupProject.cpp include/amuse/AudioGroupProject.hpp)
2018-07-15 06:10:50 +00:00
atdna(atdna_AudioGroupSampleDirectory.cpp include/amuse/AudioGroupSampleDirectory.hpp)
set(SOURCES
lib/AudioGroup.cpp
lib/AudioGroupData.cpp
lib/AudioGroupPool.cpp
lib/AudioGroupProject.cpp
lib/AudioGroupSampleDirectory.cpp
lib/DirectoryEnumerator.cpp
lib/Emitter.cpp
lib/Engine.cpp
lib/Envelope.cpp
lib/Listener.cpp
lib/Sequencer.cpp
lib/SoundMacroState.cpp
lib/SongConverter.cpp
lib/SongState.cpp
2016-05-07 22:10:57 +00:00
lib/Voice.cpp
lib/Submix.cpp
lib/Studio.cpp
2016-05-13 01:46:41 +00:00
lib/EffectReverb.cpp
2016-05-07 22:10:57 +00:00
lib/EffectChorus.cpp
lib/EffectDelay.cpp
lib/ContainerRegistry.cpp
lib/Common.cpp
lib/DSPCodec.cpp
lib/N64MusyXCodec.cpp
2018-08-16 06:26:44 +00:00
lib/VolumeTable.cpp
atdna_AudioGroupPool.cpp
2018-07-15 06:10:50 +00:00
atdna_AudioGroupProject.cpp
atdna_AudioGroupSampleDirectory.cpp)
set(HEADERS
include/amuse/AudioGroup.hpp
include/amuse/AudioGroupData.hpp
include/amuse/AudioGroupPool.hpp
include/amuse/AudioGroupProject.hpp
include/amuse/AudioGroupSampleDirectory.hpp
include/amuse/DirectoryEnumerator.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
include/amuse/SongConverter.hpp
include/amuse/SongState.hpp
include/amuse/Voice.hpp
2016-05-07 22:10:57 +00:00
include/amuse/Submix.hpp
include/amuse/Studio.hpp
2016-05-07 22:10:57 +00:00
include/amuse/IBackendSubmix.hpp
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
include/amuse/ContainerRegistry.hpp
include/amuse/Common.hpp
include/amuse/amuse.hpp
include/amuse/DSPCodec.hpp
2018-08-16 06:26:44 +00:00
include/amuse/N64MusyXCodec.hpp
include/amuse/VolumeTable.hpp)
2018-09-25 22:39:22 +00:00
if(NX)
list(APPEND HEADERS include/switch_math.hpp)
endif()
unset(EXTRAS)
if(TARGET boo)
include_directories(${BOO_INCLUDE_DIR} ${BOO_INCLUDE_DIR}/../lib ${BOO_INCLUDE_DIR}/../soxr/src
2016-09-02 19:52:17 +00:00
${LOGVISOR_INCLUDE_DIR} ${ATHENA_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${LZO_INCLUDE_DIR})
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})
2017-12-12 02:05:54 +00:00
if(COMMAND add_sanitizers)
add_sanitizers(amuse)
endif()
2017-12-29 07:57:22 +00:00
if(COMMAND cotire)
2018-01-01 02:52:40 +00:00
set_target_properties(amuse PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
2017-12-29 07:57:22 +00:00
cotire(amuse)
endif()
2016-05-09 07:22:58 +00:00
2018-10-07 02:54:56 +00:00
if(TARGET boo AND NOT WINDOWS_STORE AND NOT NX)
# AudioUnit Target (OS X only)
add_subdirectory(AudioUnit)
# VST Target
add_subdirectory(VST)
# Multi-platform CLI tools
# Player
add_executable(amuseplay WIN32 driver/amuseplay.cpp)
2017-07-02 10:14:33 +00:00
target_link_libraries(amuseplay amuse boo ${BOO_SYS_LIBS} logvisor athena-core athena-libyaml ${ZLIB_LIBRARIES} ${LZO_LIB})
# Converter
add_executable(amuseconv driver/amuseconv.cpp)
2017-07-02 10:14:33 +00:00
target_link_libraries(amuseconv amuse boo ${BOO_SYS_LIBS} logvisor athena-core athena-libyaml ${ZLIB_LIBRARIES} ${LZO_LIB})
2016-07-06 21:30:46 +00:00
# Renderer
add_executable(amuserender driver/amuserender.cpp)
2017-07-02 10:14:33 +00:00
target_link_libraries(amuserender amuse boo ${BOO_SYS_LIBS} logvisor athena-core athena-libyaml ${ZLIB_LIBRARIES} ${LZO_LIB})
2018-03-15 00:25:29 +00:00
2018-05-06 23:06:49 +00:00
if(COMMAND add_sanitizers)
add_sanitizers(amuseplay)
add_sanitizers(amuseconv)
add_sanitizers(amuserender)
endif()
2018-03-15 00:25:29 +00:00
# Editor
find_package(Qt5Widgets)
if (Qt5Widgets_FOUND)
message(STATUS "Qt5 found, amuse-gui will be built")
add_subdirectory(Editor)
else()
message(STATUS "Qt5 not found, amuse-gui will not be built")
endif()
2016-05-09 07:22:58 +00:00
endif()