Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 26 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
if(WIN32)
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.19)
cmake_policy(SET CMP0091 NEW)
else()
# USE_LIBCPP requires add_link_options() in SfizzConfig.cmake
cmake_minimum_required(VERSION 3.13)
cmake_minimum_required(VERSION 3.19)
endif()

project(libsfizz
LANGUAGES CXX C
LANGUAGES CXX C ASM
VERSION 1.2.3
)
set(PROJECT_DESCRIPTION "A library to load SFZ description files and use them to render music.")
Expand All @@ -23,34 +22,34 @@ include(OptionEx)

set(BUILD_TESTING OFF CACHE BOOL "Disable Abseil's tests [default: OFF]")

option_ex(ENABLE_LTO "Enable Link Time Optimization" ON)
option_ex(SFIZZ_JACK "Enable JACK stand-alone build" CMAKE_SYSTEM_NAME STREQUAL "Linux")
option_ex(SFIZZ_RENDER "Enable renderer of SMF files" ON)
option_ex(SFIZZ_BENCHMARKS "Enable benchmarks build" OFF)
option_ex(SFIZZ_TESTS "Enable tests build" OFF)
option_ex(SFIZZ_DEMOS "Enable feature demos build" OFF)
option_ex(SFIZZ_DEVTOOLS "Enable developer tools build" OFF)
option_ex(SFIZZ_SHARED "Enable shared library build" ON)
option_ex(SFIZZ_USE_SNDFILE "Enable use of the sndfile library" OFF)
option_ex(SFIZZ_USE_SYSTEM_ABSEIL "Use Abseil libraries preinstalled on system" OFF)
option_ex(SFIZZ_USE_SYSTEM_GHC_FS "Use GHC Filesystem libraries preinstalled on system" OFF)
option_ex(SFIZZ_USE_SYSTEM_SIMDE "Use SIMDe libraries preinstalled on system" OFF)
option_ex(SFIZZ_USE_SYSTEM_KISS_FFT "Use KISS FFT libraries preinstalled on system" OFF)
option_ex(SFIZZ_USE_SYSTEM_PUGIXML "Use pugixml libraries preinstalled on system" OFF)
option_ex(SFIZZ_USE_SYSTEM_CXXOPTS "Use CXXOPTS libraries preinstalled on system" OFF)
option_ex(SFIZZ_USE_SYSTEM_CATCH "Use Catch libraries preinstalled on system" OFF)
option_ex(SFIZZ_RELEASE_ASSERTS "Forced assertions in release builds" OFF)
option_ex(SFIZZ_PROFILE_BUILD "Profile the build time" OFF)
option_ex(SFIZZ_SNDFILE_STATIC "Link the sndfile library statically" OFF)
option_ex(SFIZZ_ASAN "Use address sanitizer on all sfizz targets" OFF)
option_ex(SFIZZ_GIT_SUBMODULE_CHECK "Check Git submodules presence" ON)
option_ex(ENABLE_LTO "Enable Link Time Optimization" ON)
option_ex(SFIZZ_JACK "Enable JACK stand-alone build" CMAKE_SYSTEM_NAME STREQUAL "Linux")
option_ex(SFIZZ_RENDER "Enable renderer of SMF files" ON)
option_ex(SFIZZ_BENCHMARKS "Enable benchmarks build" OFF)
option_ex(SFIZZ_TESTS "Enable tests build" OFF)
option_ex(SFIZZ_DEMOS "Enable feature demos build" OFF)
option_ex(SFIZZ_DEVTOOLS "Enable developer tools build" OFF)
option_ex(SFIZZ_SHARED "Enable shared library build" ON)
option_ex(SFIZZ_DOWNLOAD_DEPENDENCIES_ONLY "Only download dependencies in the CPM cache if needed" OFF)
option_ex(SFIZZ_USE_SNDFILE "Enable use of the sndfile library" OFF)
option_ex(SFIZZ_USE_SYSTEM_ABSEIL "Use Abseil libraries preinstalled on system" OFF)
option_ex(SFIZZ_USE_SYSTEM_GHC_FS "Use GHC Filesystem libraries preinstalled on system" OFF)
option_ex(SFIZZ_USE_SYSTEM_SIMDE "Use SIMDe libraries preinstalled on system" OFF)
option_ex(SFIZZ_USE_SYSTEM_KISS_FFT "Use KISS FFT libraries preinstalled on system" OFF)
option_ex(SFIZZ_USE_SYSTEM_PUGIXML "Use pugixml libraries preinstalled on system" OFF)
option_ex(SFIZZ_USE_SYSTEM_CXXOPTS "Use CXXOPTS libraries preinstalled on system" OFF)
option_ex(SFIZZ_USE_SYSTEM_CATCH "Use Catch libraries preinstalled on system" OFF)
option_ex(SFIZZ_RELEASE_ASSERTS "Forced assertions in release builds" OFF)
option_ex(SFIZZ_PROFILE_BUILD "Profile the build time" OFF)
option_ex(SFIZZ_SNDFILE_STATIC "Link the sndfile library statically" OFF)
option_ex(SFIZZ_ASAN "Use address sanitizer on all sfizz targets" OFF)
option_ex(SFIZZ_GIT_SUBMODULE_CHECK "Check Git submodules presence" ON)

# Continuous Controller count (0 to 511)
set(MIDI_CC_COUNT 512 CACHE STRING "Maximum number of managed Control Change messages")

# Ensure presence of Git submodules (when not using the source tarball)
if(SFIZZ_GIT_SUBMODULE_CHECK AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git"
AND NOT CMAKE_VERSION VERSION_LESS "3.19.0")
if(SFIZZ_GIT_SUBMODULE_CHECK AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
include(GitSubmoduleCheck)
git_submodule_check(external/abseil-cpp)
git_submodule_check(external/filesystem)
Expand Down
69 changes: 69 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 23,
"patch": 0
},
"configurePresets": [
{
"name": "base",
"hidden": true,
"displayName": "Base Configuration",
"description": "Default build using Ninja generator",
"generator": "Ninja Multi-Config",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"SFIZZ_TESTS": "OFF",
"SFIZZ_JACK": "OFF",
"SFIZZ_RENDER": "ON"
}
},
{
"name": "ci",
"hidden": true,
"displayName": "Base Configuration",
"description": "Common CI configurations",
"cacheVariables": {
"SFIZZ_USE_SYSTEM_ABSEIL": "ON"
}
},
{
"name": "windows",
"displayName": "Windows",
"description": "Windows builds",
"inherits": "base",
"toolchainFile": "${sourceDir}/cmake/Windows.MSVC.toolchain.cmake"
},
{
"name": "windows-test",
"displayName": "Windows Tests",
"description": "Windows builds with tests",
"inherits": "windows",
"cacheVariables": {
"SFIZZ_TESTS": "ON"
}
},
{
"name": "linux",
"displayName": "Linux",
"description": "Linux builds",
"inherits": "base"
},
{
"name": "linux-test",
"displayName": "Linux Tests",
"description": "Linux builds with tests",
"inherits": "linux",
"cacheVariables": {
"SFIZZ_TESTS": "ON"
}
},
{
"name": "linux-ci",
"displayName": "Linux CI",
"description": "Linux CI builds",
"inherits": ["linux-test" , "ci"]
}
]
}
1 change: 1 addition & 0 deletions Testing/Temporary/CTestCostData.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
3 changes: 3 additions & 0 deletions Testing/Temporary/LastTest.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Start testing: Oct 29 13:32 Romance Standard Time
----------------------------------------------------------
End testing: Oct 29 13:32 Romance Standard Time
2 changes: 1 addition & 1 deletion clients/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ endif()
if(SFIZZ_RENDER)
add_executable(sfizz_render MidiHelpers.h sfizz_render.cpp)
target_link_libraries(sfizz_render PRIVATE
sfizz::cxxopts
cxxopts::cxxopts
sfizz::fmidi
sfizz::internal
st_audiofile_formats
Expand Down
Loading
Loading