diff options
author | Ankit Meel <ankitjmeel@gmail.com> | 2020-10-16 11:05:58 +0300 |
---|---|---|
committer | Ankit Meel <ankitjmeel@gmail.com> | 2020-10-16 11:11:29 +0300 |
commit | bb872b25f219d1a9bc2446228b6dc7a9248d7f20 (patch) | |
tree | 2d3f4901aebfe44c0e601d9fc65d078a56722155 /build_files/cmake/platform/platform_apple.cmake | |
parent | 3ffe65a7fb990836ae389289ae9bd7a675fea980 (diff) |
CMake/macOS: Search for headers in Frameworks last.
https://devtalk.blender.org/t/libpng-version-mismatch/15799/
By default, `CMAKE_FIND_FRAMEWORK` is `FIRST`.
CMake searches headers and libraries separately. So library is found
in LIBDIR, and headers like those in Mono are detected before the
headers in LIBDIR, and we get a version mismatch.
So set the priority of Frameworks to `LAST`.
https://gitlab.kitware.com/cmake/cmake/-/issues/18921
https://gitlab.kitware.com/cmake/cmake/-/issues/16427
{rBbac91956ae97} tried to fix the same issue, but it didn't work.
It's fine to keep the changes made there, just removing the comment
that may give false sense of security.
Diffstat (limited to 'build_files/cmake/platform/platform_apple.cmake')
-rw-r--r-- | build_files/cmake/platform/platform_apple.cmake | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index f755c70a859..36e6d71bfb2 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -227,8 +227,6 @@ if(WITH_SDL) set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework ForceFeedback") endif() -# Use CMP0074 for our benefit. Stop CMake from searching libraries in one -# place and headers in another. set(PNG_ROOT ${LIBDIR}/png) find_package(PNG REQUIRED) |