diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2015-10-23 20:19:43 (GMT) |
---|---|---|
committer | Gregor Jasny <gjasny@googlemail.com> | 2015-10-23 20:19:43 (GMT) |
commit | a91eebebdb2a012c233db7869ec0ade534c4dd57 (patch) | |
tree | b4440891a66ab81bf9512af804a15eca402eb731 /Tests/RunCMake/XcodeProject/XcodeBundles.cmake | |
parent | 2f269fdf0c293e80325c748c985279bc4067af3e (diff) | |
download | CMake-a91eebebdb2a012c233db7869ec0ade534c4dd57.zip CMake-a91eebebdb2a012c233db7869ec0ade534c4dd57.tar.gz CMake-a91eebebdb2a012c233db7869ec0ade534c4dd57.tar.bz2 |
Xcode: Recognise Watch and TV OS as embedded platforms
Diffstat (limited to 'Tests/RunCMake/XcodeProject/XcodeBundles.cmake')
-rw-r--r-- | Tests/RunCMake/XcodeProject/XcodeBundles.cmake | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake index 2cbccfa..0fdc6af 100644 --- a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake @@ -10,6 +10,22 @@ if(TEST_IOS) set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO") endif(TEST_IOS) +if(TEST_WATCHOS) + set(CMAKE_OSX_SYSROOT watchos) + set(CMAKE_OSX_ARCHITECTURES "armv7k") + set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") + set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "") + set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES") +endif() + +if(TEST_TVOS) + set(CMAKE_OSX_SYSROOT appletvos) + set(CMAKE_OSX_ARCHITECTURES "arm64") + set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") + set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "") + set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES") +endif() + # App Bundle add_executable(AppBundle MACOSX_BUNDLE main.m) @@ -35,11 +51,13 @@ endif() # Bundle -add_library(Bundle MODULE main.c) -set_target_properties(Bundle PROPERTIES BUNDLE TRUE) +if(NOT CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE) + add_library(Bundle MODULE main.c) + set_target_properties(Bundle PROPERTIES BUNDLE TRUE) -add_custom_target(BundleTest ALL - COMMAND ${CMAKE_COMMAND} -E copy - "$<TARGET_FILE:Bundle>" "$<TARGET_FILE:Bundle>.old") + add_custom_target(BundleTest ALL + COMMAND ${CMAKE_COMMAND} -E copy + "$<TARGET_FILE:Bundle>" "$<TARGET_FILE:Bundle>.old") -add_dependencies(BundleTest Bundle) + add_dependencies(BundleTest Bundle) +endif() |