function(LinkAppleFrameworks TARGET) target_link_libraries(${TARGET} PUBLIC "-framework CoreFoundation" PUBLIC "-framework Foundation" PUBLIC "-framework CoreImage" PUBLIC "-framework CoreVideo" PUBLIC "-framework Metal" PUBLIC "-framework MetalPerformanceShaders" PUBLIC "-framework ARKit" PUBLIC "-lstdc++" PUBLIC c++ PUBLIC c ) # Locate system libraries on iOS find_library(UIKIT UIKit) find_library(FOUNDATION Foundation) find_library(MOBILECORESERVICES MobileCoreServices) find_library(CFNETWORK CFNetwork) find_library(SYSTEMCONFIGURATION SystemConfiguration) # link the frameworks located above target_link_libraries(${TARGET} PUBLIC ${UIKIT}) target_link_libraries(${TARGET} PUBLIC ${FOUNDATION}) target_link_libraries(${TARGET} PUBLIC ${MOBILECORESERVICES}) target_link_libraries(${TARGET} PUBLIC ${CFNETWORK}) target_link_libraries(${TARGET} PUBLIC ${SYSTEMCONFIGURATION}) endfunction()