Skip to content

Commit

Permalink
Merge pull request #1 from pallaswept/master
Browse files Browse the repository at this point in the history
  • Loading branch information
JellyBrick authored Feb 25, 2024
2 parents 2abcf77 + d5a418e commit b67178f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
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 ()

0 comments on commit b67178f

Please sign in to comment.