Fixes for library search on macOS

Fixes the screenshot function on macOS if the user installed libpng via homebrew. Previously it would link to older libraries if those were installed, while at runtime it decided to run the version installed by homebrew.
This commit is contained in:
dob205
2021-10-07 10:00:11 +02:00
committed by GitHub
parent 66db0f11a4
commit ce5a1ed054

View File

@@ -63,6 +63,11 @@ if(MINGW)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" ".dll.a")
endif()
if(APPLE)
# Force using the newest library if it's installed by homebrew
set(CMAKE_FIND_FRAMEWORK LAST)
endif()
find_package(Freetype REQUIRED)
include_directories(${FREETYPE_INCLUDE_DIRS})