Skip to content

Commit

Permalink
CMake: avoid issues with Mono framework on MacOSX
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Nov 22, 2021
1 parent 7dcdc57 commit 01968e2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,22 @@ if (RUN_CLANG_TIDY)
"-warnings-as-errors='${CLANG_TIDY_WARNINGS_AS_ERRORS}'")
endif ()
endif ()

if (APPLE)
# To avoid the issue mentioned at
# https://stackoverflow.com/questions/36523911/osx-homebrew-cmake-libpng-version-mismatch-issue on github action
# MacOSX workers that have the Mono framework installed, whose libpng headers will be used instead of the homebrew
# ones
get_property(
result
CACHE CMAKE_FIND_FRAMEWORK
PROPERTY TYPE)
if (NOT result)
set(CMAKE_FIND_FRAMEWORK LAST)
message("Setting CMAKE_FIND_FRAMEWORK=${CMAKE_FIND_FRAMEWORK}")
endif ()
endif ()

#
# Developer may want to specify some variable to find proper version.
# ~~~
Expand Down

0 comments on commit 01968e2

Please sign in to comment.