}
+/* compatibilty functions */
+size_t fwrite$UNIX2003( const void *ptr, size_t size, size_t nmemb, FILE *stream )
+{
+ return fwrite(ptr, size , nmemb, stream);
+}
endif (CMAKE_UNAME)
# Force the compilers to gcc for iOS
-if(NOT CMAKE_C_COMPILER)
- include (CMakeForceCompiler)
- CMAKE_FORCE_C_COMPILER (gcc GNU)
- CMAKE_FORCE_CXX_COMPILER (g++ GNU)
-endif()
+include (CMakeForceCompiler)
+CMAKE_FORCE_C_COMPILER (/usr/bin/clang Apple)
+CMAKE_FORCE_CXX_COMPILER (/usr/bin/clang++ Apple)
+set(CMAKE_AR ar CACHE FILEPATH "" FORCE)
# Skip the platform compiler checks for cross compiling
#set (CMAKE_CXX_COMPILER_WORKS TRUE)
# Hidden visibilty is required for cxx on iOS
set (CMAKE_C_FLAGS_INIT "")
-set (CMAKE_CXX_FLAGS_INIT "-headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden")
+set (CMAKE_CXX_FLAGS_INIT "-fvisibility=hidden -fvisibility-inlines-hidden -isysroot ${CMAKE_OSX_SYSROOT}")
set (CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
set (CMAKE_CXX_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")