diff --git a/plugins/hifiSdl2/CMakeLists.txt b/plugins/hifiSdl2/CMakeLists.txt index c68723a10a..e1f0ee28d8 100644 --- a/plugins/hifiSdl2/CMakeLists.txt +++ b/plugins/hifiSdl2/CMakeLists.txt @@ -8,7 +8,14 @@ if (NOT APPLE) set(TARGET_NAME hifiSdl2) + if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 10.0) + # GCC 10 and above sets -fno-common by default, and causes a linking problem here: + # multiple definition of `WAYLAND_wl_proxy_marshal' + # + # Work around it per https://medium.com/@clentfort/using-esy-sdl2-with-gcc-10-91b4fa0c5aa9 + link_libraries("-Wl,--allow-multiple-definition") + endif() setup_hifi_plugin(Qml) link_hifi_libraries(shared controllers ui plugins input-plugins script-engine) target_sdl2() -endif() \ No newline at end of file +endif()