File: iOS.cmake

package info (click to toggle)
ausweisapp2 2.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,632 kB
  • sloc: cpp: 114,622; python: 2,833; xml: 1,426; java: 923; sh: 186; makefile: 7
file content (56 lines) | stat: -rw-r--r-- 1,759 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
if("IPA" IN_LIST NAMES)
	set(IPA ON)
	set(TARGET ipa)
	set(PRESET ci-ios)
elseif("Framework" IN_LIST NAMES)
	set(TARGET zip)
	set(PRESET ci-ios-framework)
	if("Simulator" IN_LIST NAMES)
		set(PRESET ${PRESET}-simulator)
		if("x86" IN_LIST NAMES AND "64" IN_LIST NAMES)
			set(PRESET ${PRESET}-x86_64)
		elseif("arm64" IN_LIST NAMES)
			set(PRESET ${PRESET}-arm64)
		endif()
	endif()
elseif("SwiftPackage" IN_LIST NAMES)
	step(${CMAKE_COMMAND} -DDIST_DIR=${T_DIST_DIR} -P ${CMAKE_DIR}/SwiftPackage.cmake)
	return()
endif()

block()
	include(Libraries)
endblock()

if("Simulator" IN_LIST NAMES)
	set(PLATFORM "iOS Simulator")
else()
	set(PLATFORM "iOS")
endif()

step(security unlock-keychain $ENV{KEYCHAIN_CREDENTIALS} $ENV{HOME}/Library/Keychains/login.keychain-db)

step(${T_CFG} --preset ${PRESET})

if(IPA AND NOT REVIEW)
	step(xcodebuild -configuration MinSizeRel -archivePath AusweisApp.xcarchive -scheme AusweisAppBinary -destination "generic/platform=${PLATFORM}" archive CHDIR ${T_BUILD_DIR})
	step(xcodebuild -configuration MinSizeRel -archivePath AusweisApp.xcarchive -exportArchive -exportOptionsPlist exportOptions.plist -exportPath . CHDIR ${T_BUILD_DIR})
else()
	step(xcodebuild -configuration MinSizeRel -scheme AusweisAppBinary -destination "generic/platform=${PLATFORM}" CHDIR ${T_BUILD_DIR})
endif()

if(RELEASE)
	step(${CMAKE_COMMAND} -E tar cf AusweisApp_BuildDir.tar.zstd --zstd build)
endif()

step(xcodebuild -configuration MinSizeRel -target ${TARGET} CHDIR ${T_BUILD_DIR})

if(IPA AND NOT RELEASE)
	step(${T_CTEST} -C MinSizeRel)
endif()

if(DEFINED ENV{JENKINS_HOME} AND IPA AND RELEASE AND DEFINED ENV{USE_DISTRIBUTION_PROFILE})
	if($ENV{USE_DISTRIBUTION_PROFILE})
		include(${CMAKE_CI_DIR}/Deploy.cmake/IPA.cmake)
	endif()
endif()