Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate URI breaking LV2 compilation, fix broken cmake config for packaging #1

Merged
merged 3 commits into from
Feb 25, 2024
Merged
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
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ if (WITH_AVX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Ox /arch:AVX2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Ox /arch:AVX2")
else ()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -march=native -mtune=native -mavx -mavx2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -march=native -mtune=native -mavx -mavx2")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -mavx -mavx2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -mavx -mavx2")
endif ()
endif ()

Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,22 +206,23 @@ External dependencies are vendored via [git-subrepo](https://github.com/ingydotn
Improvements are welcomed! Though if you want to contribute anything sizeable - open an issue first.

### Compiling
Note: Alter march/mtune flags as appropriate for the target CPU where the plugin will run. If building for multiple CPU targets, such as packaging or building for your studio/home/friends, do not set these at all.

Compiling for x64:
```sh
cmake -Bbuild-x64 -H. -GNinja -DCMAKE_BUILD_TYPE=Release
cmake -D CMAKE_CXX_FLAGS=-march=native -mtune=native -D CMAKE_C_FLAGS=-march=native -mtune=native -Bbuild-x64 -H. -GNinja -DCMAKE_BUILD_TYPE=Release
ninja -C build-x64
```

Compiling for x32:
```sh
cmake -D CMAKE_CXX_FLAGS=-m32 -D CMAKE_C_FLAGS=-m32 -Bbuild-x32 -H. -GNinja -DCMAKE_BUILD_TYPE=Release
cmake -D CMAKE_CXX_FLAGS=-march=native -mtune=native -D CMAKE_C_FLAGS=-march=native -mtune=native -D -m32 -Bbuild-x32 -H. -GNinja -DCMAKE_BUILD_TYPE=Release
ninja -C build-x32
```

Cross-compiling for Windows x64 (MinGW builds are failing at the moment due to certain incompatibilities in JUCE):
```sh
cmake -Bbuild-mingw64 -H. -GNinja -DCMAKE_TOOLCHAIN_FILE=toolchains/toolchain-mingw64.cmake -DCMAKE_BUILD_TYPE=Release
cmake -D CMAKE_CXX_FLAGS=-march=native -mtune=native -D CMAKE_C_FLAGS=-march=native -mtune=native -Bbuild-mingw64 -H. -GNinja -DCMAKE_TOOLCHAIN_FILE=toolchains/toolchain-mingw64.cmake -DCMAKE_BUILD_TYPE=Release
ninja -C build-mingw64
```

Expand Down
4 changes: 2 additions & 2 deletions src/juce_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function(compile_plugins formats suffix default_channels)
PLUGIN_CODE Rnn1 # A unique four-character plugin id with at least one upper-case character
FORMATS "${formats}"
PRODUCT_NAME "rnnoise${suffix}"
LV2URI "https://github.com/werman/noise-suppression-for-voice"
LV2URI "https://github.com/werman/noise-suppression-for-voice#${default_channels}ch"
VST_COPY_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/vst"
VST3_COPY_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
AU_COPY_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
Expand Down Expand Up @@ -135,4 +135,4 @@ endif ()

if (FORMATS)
compile_plugins("${FORMATS}" "" 1)
endif ()
endif ()