diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d60b089..2aac8632 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 () diff --git a/README.md b/README.md index 0e7db100..74f7d4a0 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/src/juce_plugin/CMakeLists.txt b/src/juce_plugin/CMakeLists.txt index 94dbdc7c..e1a1bb48 100644 --- a/src/juce_plugin/CMakeLists.txt +++ b/src/juce_plugin/CMakeLists.txt @@ -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}" @@ -135,4 +135,4 @@ endif () if (FORMATS) compile_plugins("${FORMATS}" "" 1) -endif () \ No newline at end of file +endif ()