1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

CMake: Add -Wl,--no-undefined to linker flags on Linux

Fixes an issue where VST3 plugins would appear to link successfully, but
fail to load in hosts due to missing symbols.
This commit is contained in:
reuk 2020-05-14 11:40:09 +01:00
parent 04b6d1c1cf
commit 1d39710144

View file

@ -1340,6 +1340,10 @@ function(_juce_link_plugin_wrapper shared_code_target kind)
add_library(${target_name} MODULE)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_libraries(${target_name} PRIVATE "-Wl,--no-undefined")
endif()
# We re-export the shared code's private include dirs, because the wrapper targets need to
# see the module headers. We don't just link publicly, because that would introduce
# conflicting macro definitions.