Files
OpenVulkano/cmake/functions/AppleHelper.cmake
2024-08-04 14:43:31 +02:00

29 lines
1.2 KiB
CMake

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()