Fix some linking issues on MacOS
This commit is contained in:
@@ -74,7 +74,8 @@ if(IOS)
|
|||||||
set(MACOSX_BUNDLE_BUNDLE_NAME ${APP_BUNDLE_IDENTIFIER})
|
set(MACOSX_BUNDLE_BUNDLE_NAME ${APP_BUNDLE_IDENTIFIER})
|
||||||
|
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "14.1") # The used ARKit features are only available starting with iOS 14
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "14.1") # The used ARKit features are only available starting with iOS 14
|
||||||
|
endif()
|
||||||
|
if(APPLE)
|
||||||
LinkAppleFrameworks(openVulkanoCpp)
|
LinkAppleFrameworks(openVulkanoCpp)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,14 @@ function(LinkAppleFrameworks TARGET)
|
|||||||
PUBLIC "-framework CoreVideo"
|
PUBLIC "-framework CoreVideo"
|
||||||
PUBLIC "-framework Metal"
|
PUBLIC "-framework Metal"
|
||||||
PUBLIC "-framework MetalPerformanceShaders"
|
PUBLIC "-framework MetalPerformanceShaders"
|
||||||
PUBLIC "-framework ARKit"
|
|
||||||
PUBLIC "-lstdc++"
|
PUBLIC "-lstdc++"
|
||||||
PUBLIC c++
|
PUBLIC c++
|
||||||
PUBLIC c
|
PUBLIC c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(IOS)
|
||||||
|
target_link_libraries(${TARGET} PUBLIC "-framework ARKit")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Locate system libraries on iOS
|
# Locate system libraries on iOS
|
||||||
find_library(UIKIT UIKit)
|
find_library(UIKIT UIKit)
|
||||||
@@ -19,11 +21,20 @@ function(LinkAppleFrameworks TARGET)
|
|||||||
find_library(MOBILECORESERVICES MobileCoreServices)
|
find_library(MOBILECORESERVICES MobileCoreServices)
|
||||||
find_library(CFNETWORK CFNetwork)
|
find_library(CFNETWORK CFNetwork)
|
||||||
find_library(SYSTEMCONFIGURATION SystemConfiguration)
|
find_library(SYSTEMCONFIGURATION SystemConfiguration)
|
||||||
|
find_library(APPKIT AppKit)
|
||||||
|
find_library(IOSURFACE IOSurface)
|
||||||
|
find_library(QUARTZ Quartz)
|
||||||
|
|
||||||
# link the frameworks located above
|
# link the frameworks located above
|
||||||
target_link_libraries(${TARGET} PUBLIC ${UIKIT})
|
if(IOS)
|
||||||
|
target_link_libraries(${TARGET} PUBLIC ${UIKIT})
|
||||||
|
target_link_libraries(${TARGET} PUBLIC ${MOBILECORESERVICES})
|
||||||
|
else()
|
||||||
|
target_link_libraries(${TARGET} PUBLIC ${APPKIT})
|
||||||
|
target_link_libraries(${TARGET} PUBLIC ${IOSURFACE})
|
||||||
|
target_link_libraries(${TARGET} PUBLIC ${QUARTZ})
|
||||||
|
endif()
|
||||||
target_link_libraries(${TARGET} PUBLIC ${FOUNDATION})
|
target_link_libraries(${TARGET} PUBLIC ${FOUNDATION})
|
||||||
target_link_libraries(${TARGET} PUBLIC ${MOBILECORESERVICES})
|
|
||||||
target_link_libraries(${TARGET} PUBLIC ${CFNETWORK})
|
target_link_libraries(${TARGET} PUBLIC ${CFNETWORK})
|
||||||
target_link_libraries(${TARGET} PUBLIC ${SYSTEMCONFIGURATION})
|
target_link_libraries(${TARGET} PUBLIC ${SYSTEMCONFIGURATION})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|||||||
Reference in New Issue
Block a user