Skip to content

Commit

Permalink
Added some CMake presets for Linux...
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanjhood committed Mar 20, 2024
1 parent d0ab195 commit 4026ebc
Show file tree
Hide file tree
Showing 9 changed files with 587 additions and 53 deletions.
20 changes: 12 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
{
"editor.rulers": [80],

"C_Cpp.vcpkg.enabled": true,
"C_Cpp.autoAddFileAssociations": true,
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",

"cmake.configureOnEdit": false,
"cmake.configureOnOpen": false,
"cmake.automaticReconfigure": false,

"cmake.setBuildTypeOnMultiConfig": true,
"cmake.loadCompileCommands": true,
"cmake.useCMakePresets": "auto",

"cmake.cmakePath": "cmake",

"cmake.sourceDirectory": "${workspaceFolder}",
Expand All @@ -15,10 +23,10 @@
// "VCPKG_ROOT": "${workspaceFolder}/vcpkg",
"VCPKG_MANIFEST_MODE": false,
"VCPKG_PREFER_SYSTEM_INSTALLED_BINARIES": true,
// "CMAKE_TOOLCHAIN_FILE": "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"CMAKE_MAKE_PROGRAM": "make",
"CMAKE_CONFIGURATION_TYPES": "Debug;Release",
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_TOOLCHAIN_FILE": "~/vcpkg/scripts/buildsystems/vcpkg.cmake",
// "CMAKE_MAKE_PROGRAM": "make",
// "CMAKE_CONFIGURATION_TYPES": "Debug;Release",
// "CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
"STONEYDSP_BIQUADS_BUILD_TESTS": true
Expand Down Expand Up @@ -113,10 +121,6 @@
}
},

"C_Cpp.vcpkg.enabled": true,
"C_Cpp.autoAddFileAssociations": true,
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",

"files.exclude": {
"**/.git": true,
"**/.svn": true,
Expand Down
19 changes: 17 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ option (STONEYDSP_BIQUADS_USING_JUCE_RECOMMENDED_WARNING_FLAGS "Link with juce::

set (STONEYDSP_BIQUADS_TARGETS "")

#find_package (StoneyDSP CONFIG REQUIRED)

#[=============================================================================[
# target: StoneyDSP::stoneydsp_core
# target: StoneyDSP::stoneydsp_audio
#]=============================================================================]

# find_package (StoneyDSP CONFIG REQUIRED)

add_subdirectory(modules)

set_directory_properties(PROPERTIES
Expand Down Expand Up @@ -493,6 +493,21 @@ configure_package_config_file(
# )
# endif ()

install (
DIRECTORY "${STONEYDSP_BIQUADS_BINARY_DIR}/bin"
DESTINATION "Builds"
)

install (
DIRECTORY "${STONEYDSP_BIQUADS_BINARY_DIR}/lib"
DESTINATION "Builds"
)

install (
DIRECTORY "${STONEYDSP_BIQUADS_BINARY_DIR}/share"
DESTINATION "Builds"
)

install (
DIRECTORY "${STONEYDSP_BIQUADS_BINARY_DIR}/Biquads_Audio_Plugin_artefacts"
DESTINATION "Builds"
Expand Down
73 changes: 73 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 23,
"patch": 0
},
"include": [
"./share/cmake/Presets/Linux/LinuxCMakePresets.json"
],
"vendor": {},
"configurePresets": [
{
"name": "default",
"hidden": true,
"displayName": "Default Config",
"description": "Default build using Ninja generator",
"generator": "Ninja",
"binaryDir": "${sourceDir}/Builds",
"cacheVariables": {
"STONEYDSP_BIQUADS_BUILD_TESTS": { "type": "BOOL", "value": "OFF" }
}
},
{
"name": "ninja-multi-config",
"hidden": true,
"inherits": "default",
"displayName": "Ninja Multi-Config",
"description": "Default build using Ninja Multi-Config generator",
"generator": "Ninja Multi-Config"
}
],
"buildPresets": [
{
"name": "default",
"displayName": "Default",
"verbose": false,
"description": "An empty preset that does not add any arguments",
"targets": [
"all",
"install",
"clean",
"juce_vst3_helper",
"Biquads_Audio_Plugin_Dependencies",
"Biquads_Audio_Plugin_Library",
"Biquads_Audio_Plugin",
"Biquads_Audio_Plugin_Standalone",
"Biquads_Audio_Plugin_VST3",
"Biquads_Audio_Plugin_All"
]
},
{
"name": "verbose",
"displayName": "Verbose",
"description": "An verbose preset that does not add any arguments",
"verbose": true,
"inherits": "default"
}
],
"testPresets": [
{
"name": "default",
"configurePreset": "default",
"output": {
"outputOnFailure": true
},
"execution": {
"noTestsAction": "error",
"stopOnFailure": true
}
}
]
}
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.3.155
1.2.3.156
2 changes: 2 additions & 0 deletions include/StoneyDSP/Biquads/Parameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class AudioPluginAudioProcessorParameters
*/
static juce::AudioProcessorValueTreeState::ParameterLayout createParameterLayout();

static juce::AudioProcessorParameterGroup createParameterGroup();

//==============================================================================
juce::UndoManager& getUndoManager() { return undoManager; }
//==============================================================================
Expand Down
29 changes: 20 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,27 @@
"readme": "https://github.com/nathanjhood/Biquads/README.md",
"license": "GPL-3.0",
"scripts": {
"configure": "cmake -S . -B ./build -DSTONEYDSP_BIQUADS_BUILD_TESTS:BOOL=TRUE -DCMAKE_INSTALL_PREFIX:PATH=./install -G Ninja",
"reconfigure": "cmake --fresh -S . -B ./build -DSTONEYDSP_BIQUADS_BUILD_TESTS:BOOL=TRUE -DCMAKE_INSTALL_PREFIX:PATH=./install -G Ninja",
"build": "cmake --build ./build",
"postbuild": "cmake --install ./build",
"ctest": "ctest --test-dir ./build --rerun-failed --output-on-failure --verbose",
"cpack": "cpack --config ./build/CPackSourceConfig.cmake -B ./install",
"cdist": "cpack --config ./build/CPackConfig.cmake -B ./install",

"sys:config": "cmake --fresh -S . -B ./build -DSTONEYDSP_BIQUADS_BUILD_TESTS:BOOL=TRUE -GNinja",
"sys:install": "cmake --build ./build && cmake --build ./build --target install"
"configure": "cmake -S . -B ./build -G Ninja",
"reconfigure": "cmake --fresh -S . -B ./build -G Ninja",
"build": "cmake --build ./build",
"postbuild": "cmake --install ./build",
"ctest": "ctest --test-dir ./build --rerun-failed --output-on-failure --verbose",
"cpack": "cpack --config ./build/CPackSourceConfig.cmake -B ./install",
"cdist": "cpack --config ./build/CPackConfig.cmake -B ./install",
"clean": "cmake --build ./build --target clean",

"dbg:configure": "cmake -S . -B ./build -DCMAKE_BUILD_TYPE:STRING=Debug -G Ninja",
"dbg:reconfigure": "cmake --fresh -S . -B ./build --config Debug -G Ninja",
"dbg:build": "cmake --build ./build --config Debug",
"dbg:postbuild": "cmake --install ./build --config Debug --prefix ./install",
"dbg:clean": "cmake --build ./build --config Debug --target clean",

"rel:configure": "cmake -S . -B ./build -DCMAKE_BUILD_TYPE:STRING=Release -G Ninja",
"rel:reconfigure": "cmake --fresh -S . -B ./build --config Debug -G Ninja",
"rel:build": "cmake --build ./build --config Release",
"rel:postbuild": "cmake --install ./build --config Release --prefix ./install",
"rel:clean": "cmake --build ./build --config Release --target clean"
},
"engines": {
"node": ">=16.8.0"
Expand Down
132 changes: 132 additions & 0 deletions share/cmake/Presets/CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
{
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 23,
"patch": 0
},
"include": [
],
"configurePresets": [
{
"name": "default",
"hidden": true,
"displayName": "Default Config",
"description": "Default build using Ninja generator",
"generator": "Ninja",
"binaryDir": "${sourceDir}/Builds",
"cacheVariables": {
"FIRST_CACHE_VARIABLE": {
"type": "BOOL",
"value": "OFF"
},
"SECOND_CACHE_VARIABLE": "ON"
},
"environment": {
"MY_ENVIRONMENT_VARIABLE": "Test",
"PATH": "$env{HOME}/ninja/bin:$penv{PATH}"
},
"vendor": {
"example.com/ExampleIDE/1.0": {
"autoFormat": true
}
}
},
{
"name": "ninja-multi",
"inherits": "default",
"displayName": "Ninja Multi-Config",
"description": "Default build using Ninja Multi-Config generator",
"generator": "Ninja Multi-Config"
},
{
"name": "windows-only",
"inherits": "default",
"displayName": "Windows-only configuration",
"description": "This build is only available on Windows",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "linux-only",
"inherits": "default",
"displayName": "Linux-only configuration",
"description": "This build is only available on Linux",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
"name": "darwin-only",
"inherits": "default",
"displayName": "Darwin-only configuration",
"description": "This build is only available on Darwin",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
}
],
"buildPresets": [
{
"name": "default",
"configurePreset": "default"
}
],
"testPresets": [
{
"name": "default",
"configurePreset": "default",
"output": {
"outputOnFailure": true
},
"execution": {
"noTestsAction": "error",
"stopOnFailure": true
}
}
],
"packagePresets": [
{
"name": "default",
"configurePreset": "default",
"generators": [
"TGZ"
]
}
],
"workflowPresets": [
{
"name": "default",
"steps": [
{
"type": "configure",
"name": "default"
},
{
"type": "build",
"name": "default"
},
{
"type": "test",
"name": "default"
},
{
"type": "package",
"name": "default"
}
]
}
],
"vendor": {
"example.com/ExampleIDE/1.0": {
"autoFormat": false
}
}
}
Loading

0 comments on commit 4026ebc

Please sign in to comment.