From 49a23c1dfa0623b19185cff754cc0a07c9f30aaf Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Thu, 18 Jun 2020 20:18:45 +0200 Subject: [PATCH] CMake: fix try_compile and other checks for iOS build --- build/cmake/toolkit.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/cmake/toolkit.cmake b/build/cmake/toolkit.cmake index 2b8dbbe5db..577d3c8661 100644 --- a/build/cmake/toolkit.cmake +++ b/build/cmake/toolkit.cmake @@ -12,6 +12,10 @@ wx_option(wxUSE_GUI "Use GUI" ON) if(CMAKE_OSX_SYSROOT MATCHES iphoneos) set(IPHONE ON) + + # workaround a bug where try_compile (and functions using it, + # like find_package, check_c_source_compiles) fails + set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) endif() if(WIN32)