summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2021-02-27 01:34:00 +0100
committerLoïc Guilloux <glx22@users.noreply.github.com>2021-02-27 02:23:33 +0100
commit54fb4c04e39a988fe47c22c950d46527f857e077 (patch)
treeab43066fc9b08a4863e34f5575073c6a3499aa47 /CMakeLists.txt
parentfe451b8dc76caf87f09b120b9d57b7f4eff5d46c (diff)
downloadopenttd-54fb4c04e39a988fe47c22c950d46527f857e077.tar.xz
Fix: [CMake] libpng header/library mismatch for macos
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8482be6ed..728057ce8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -104,6 +104,11 @@ if(OPTION_TOOLS_ONLY)
return()
endif()
+if(APPLE)
+ # Avoid searching for headers in Frameworks, and libraries in LIBDIR.
+ set(CMAKE_FIND_FRAMEWORK LAST)
+endif()
+
# Prefer -pthread over -lpthread, which is often the better option of the two.
set(CMAKE_THREAD_PREFER_PTHREAD YES)
# Make sure we have Threads available.