[Bf-blender-cvs] [bac91956ae9] master: CMake/macOS: set package_ROOT for PNG, JPEG, TIFF
Ankit Meel
noreply at git.blender.org
Thu Oct 15 15:20:37 CEST 2020
Commit: bac91956ae9755722b81da4b6a0a394f9f77b2e1
Author: Ankit Meel
Date: Thu Oct 15 18:49:45 2020 +0530
Branches: master
https://developer.blender.org/rBbac91956ae9755722b81da4b6a0a394f9f77b2e1
CMake/macOS: set package_ROOT for PNG, JPEG, TIFF
https://devtalk.blender.org/t/libpng-version-mismatch/15799/
In this case, CMake finds libraries in `LIBDIR`, but picks headers from
`/Library/Frameworks/` (Mono framework).
CMP0074 is already enabled, so use it.
===================================================================
M build_files/cmake/platform/platform_apple.cmake
===================================================================
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index 020f8defdc0..b22adbc68d5 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -227,10 +227,15 @@ 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)
+set(JPEG_ROOT ${LIBDIR}/jpeg)
find_package(JPEG REQUIRED)
+set(TIFF_ROOT ${LIBDIR}/tiff)
find_package(TIFF REQUIRED)
if(WITH_BOOST)
More information about the Bf-blender-cvs
mailing list