diff --git a/CMakeLists.txt b/CMakeLists.txt index 50c5464bb0..1902f0e618 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,11 @@ set(CMAKE_C_VISIBILITY_PRESET hidden) set(CMAKE_CXX_VISIBILITY_PRESET hidden) set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) +# Fixes warning ld: warning: ignoring duplicate libraries on Mac and Windows. +if (POLICY CMP0156) + cmake_policy(SET CMP0156 NEW) +endif() + if (APPLE AND NOT ("${CMAKE_SYSTEM_NAME}" STREQUAL Android)) # OBJC/OBJCXX are needed to skip m/mm files in Unity builds. # https://gitlab.kitware.com/cmake/cmake/-/issues/21963