diff options
Diffstat (limited to 'Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedSingleArch.cmake')
-rw-r--r-- | Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedSingleArch.cmake | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedSingleArch.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedSingleArch.cmake new file mode 100644 index 0000000..cb22e51 --- /dev/null +++ b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedSingleArch.cmake @@ -0,0 +1,26 @@ +enable_language(CXX) + +set(iphoneos_arch armv7) +if(XCODE_VERSION VERSION_GREATER_EQUAL 14) + set(CMAKE_OSX_DEPLOYMENT_TARGET 16) + set(iphoneos_arch arm64) +elseif(XCODE_VERSION VERSION_GREATER_EQUAL 9) + set(CMAKE_OSX_DEPLOYMENT_TARGET 10) +endif() + +set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO") +set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") +set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "") +set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf") + +add_library(foo SHARED foo.cpp) +install(TARGETS foo DESTINATION lib) + +set_target_properties( + foo + PROPERTIES + XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] ${iphoneos_arch} + XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] ${iphoneos_arch} + XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "" + XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "" +) |