Skip to content

Commit

Permalink
fix(cmake): fix nlopt link
Browse files Browse the repository at this point in the history
  • Loading branch information
zsliu98 committed Dec 3, 2024
1 parent 4aa4306 commit c34a908
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,17 @@ target_link_libraries(SharedCode
)

# add nlopt
set(BUILD_SHARED_LIBS OFF)

add_subdirectory(nlopt)

# Link the JUCE plugin targets our SharedCode target
target_link_libraries("${PROJECT_NAME}" PRIVATE SharedCode nlopt)
target_link_libraries(SharedCode
INTERFACE
nlopt
)

# Link the nlopt targets our SharedCode target
target_link_libraries("${PROJECT_NAME}" PRIVATE SharedCode)

# IPP support, comment out to disable
include(PamplejuceIPP)
Expand Down
1 change: 1 addition & 0 deletions source/dsp/eq_match/eq_match_optimizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define ZLEQMATCH_EQ_MATCH_OPTIMIZER_HPP
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-enum"
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#include "nlopt.hpp"
#pragma GCC diagnostic pop
#include "../filter/ideal_filter/ideal_filter.hpp"
Expand Down
1 change: 0 additions & 1 deletion source/dsp/fft_analyzer/average_fft_analyzer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ namespace zlFFT {
const float rms = juce::Decibels::gainToDecibels(ms, -160.f) * 0.5f;
if (rms < -80.f) { continue; }
// calculate loudness weighting

const auto weight = calculateWeight(rms);
currentNum[i] += weight;
const auto newWeight = weight / currentNum[i];
Expand Down

0 comments on commit c34a908

Please sign in to comment.