Skip to content

Commit

Permalink
fixes win compilation for new pitch detection
Browse files Browse the repository at this point in the history
  • Loading branch information
bboettcher3 committed Jan 17, 2024
1 parent 28a6ea6 commit da4910d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ SET(GRAINBOW_BINARY_NAME "${CMAKE_PROJECT_NAME}" CACHE STRING "Override plugin n
# https://github.com/juce-framework/JUCE/commit/6b1b4cf7f6b1008db44411f2c8887d71a3348889
set_property(GLOBAL PROPERTY USE_FOLDERS YES)

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

# OPTIONS -------

# Create a /Modules directory in the IDE with the JUCE Module code
option(JUCE_ENABLE_MODULE_SOURCE_GROUPS "Show all module sources in IDE projects" ON)

option(RTNeural_Release "When CMAKE_BUILD_TYPE=Debug, overwrite it to Release for RTNeural only" ON)
option(RTNeural_Release "When CMAKE_BUILD_TYPE=Debug, overwrite it to Release for RTNeural only" OFF)

# ---------------

Expand Down Expand Up @@ -270,6 +272,9 @@ add_library(onnxruntime STATIC IMPORTED)
if (APPLE OR UNIX)
set_property(TARGET onnxruntime PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/external/ONNXRuntime/lib/libonnxruntime.a)
elseif (WIN32)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")

set_property(TARGET onnxruntime APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)

set_target_properties(onnxruntime PROPERTIES
Expand Down Expand Up @@ -337,8 +342,8 @@ target_link_libraries(gRainbow
onnxruntime
PUBLIC
juce::juce_recommended_config_flags
juce::juce_recommended_lto_flags
juce::juce_recommended_warning_flags)
juce::juce_recommended_lto_flags)
# juce::juce_recommended_warning_flags)

# When present, use Intel IPP for performance on Windows
if(MSVC)
Expand Down

0 comments on commit da4910d

Please sign in to comment.