1*da0073e9SAndroid Build Coastguard Worker# This file is based off of the Platform/Darwin.cmake and Platform/UnixPaths.cmake 2*da0073e9SAndroid Build Coastguard Worker# files which are included with CMake 2.8.4 3*da0073e9SAndroid Build Coastguard Worker# It has been altered for iOS development 4*da0073e9SAndroid Build Coastguard Worker 5*da0073e9SAndroid Build Coastguard Worker# Options: 6*da0073e9SAndroid Build Coastguard Worker# 7*da0073e9SAndroid Build Coastguard Worker# IOS_PLATFORM = OS (default) or SIMULATOR 8*da0073e9SAndroid Build Coastguard Worker# This decides if SDKS will be selected from the iPhoneOS.platform or iPhoneSimulator.platform folders 9*da0073e9SAndroid Build Coastguard Worker# OS - the default, used to build for iPhone and iPad physical devices, which have an arm arch. 10*da0073e9SAndroid Build Coastguard Worker# SIMULATOR - used to build for the Simulator platforms, which now uses arm64 arch. 11*da0073e9SAndroid Build Coastguard Worker# 12*da0073e9SAndroid Build Coastguard Worker# CMAKE_IOS_DEVELOPER_ROOT = automatic(default) or /path/to/platform/Developer folder 13*da0073e9SAndroid Build Coastguard Worker# By default this location is automatcially chosen based on the IOS_PLATFORM value above. 14*da0073e9SAndroid Build Coastguard Worker# If set manually, it will override the default location and force the user of a particular Developer Platform 15*da0073e9SAndroid Build Coastguard Worker# 16*da0073e9SAndroid Build Coastguard Worker# CMAKE_IOS_SDK_ROOT = automatic(default) or /path/to/platform/Developer/SDKs/SDK folder 17*da0073e9SAndroid Build Coastguard Worker# By default this location is automatcially chosen based on the CMAKE_IOS_DEVELOPER_ROOT value. 18*da0073e9SAndroid Build Coastguard Worker# In this case it will always be the most up-to-date SDK found in the CMAKE_IOS_DEVELOPER_ROOT path. 19*da0073e9SAndroid Build Coastguard Worker# If set manually, this will force the use of a specific SDK version 20*da0073e9SAndroid Build Coastguard Worker 21*da0073e9SAndroid Build Coastguard Worker# Macros: 22*da0073e9SAndroid Build Coastguard Worker# 23*da0073e9SAndroid Build Coastguard Worker# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE) 24*da0073e9SAndroid Build Coastguard Worker# A convenience macro for setting xcode specific properties on targets 25*da0073e9SAndroid Build Coastguard Worker# example: set_xcode_property (myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1") 26*da0073e9SAndroid Build Coastguard Worker# 27*da0073e9SAndroid Build Coastguard Worker# find_host_package (PROGRAM ARGS) 28*da0073e9SAndroid Build Coastguard Worker# A macro used to find executable programs on the host system, not within the iOS environment. 29*da0073e9SAndroid Build Coastguard Worker# Thanks to the android-cmake project for providing the command 30*da0073e9SAndroid Build Coastguard Worker 31*da0073e9SAndroid Build Coastguard Worker# Standard settings 32*da0073e9SAndroid Build Coastguard Workerset(CMAKE_SYSTEM_NAME Darwin) 33*da0073e9SAndroid Build Coastguard Workerset(CMAKE_SYSTEM_VERSION 1) 34*da0073e9SAndroid Build Coastguard Workerset(UNIX True) 35*da0073e9SAndroid Build Coastguard Workerset(APPLE True) 36*da0073e9SAndroid Build Coastguard Workerset(IOS True) 37*da0073e9SAndroid Build Coastguard Worker 38*da0073e9SAndroid Build Coastguard Worker# Required as of cmake 2.8.10 39*da0073e9SAndroid Build Coastguard Workerset(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE) 40*da0073e9SAndroid Build Coastguard Worker 41*da0073e9SAndroid Build Coastguard Worker# Determine the cmake host system version so we know where to find the iOS SDKs 42*da0073e9SAndroid Build Coastguard Workerfind_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin) 43*da0073e9SAndroid Build Coastguard Workerif(CMAKE_UNAME) 44*da0073e9SAndroid Build Coastguard Worker execute_process(COMMAND uname -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) 45*da0073e9SAndroid Build Coastguard Worker string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}") 46*da0073e9SAndroid Build Coastguard Workerendif(CMAKE_UNAME) 47*da0073e9SAndroid Build Coastguard Worker 48*da0073e9SAndroid Build Coastguard Worker# Force the compilers to gcc for iOS 49*da0073e9SAndroid Build Coastguard Workerset(CMAKE_C_COMPILER /usr/bin/gcc CACHE STRING "") 50*da0073e9SAndroid Build Coastguard Workerset(CMAKE_CXX_COMPILER /usr/bin/g++ CACHE STRING "") 51*da0073e9SAndroid Build Coastguard Workerset(CMAKE_AR ar CACHE FILEPATH "" FORCE) 52*da0073e9SAndroid Build Coastguard Workerset(CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE) 53*da0073e9SAndroid Build Coastguard Workerset(PKG_CONFIG_EXECUTABLE pkg-config CACHE FILEPATH "" FORCE) 54*da0073e9SAndroid Build Coastguard Worker 55*da0073e9SAndroid Build Coastguard Worker# Setup iOS platform unless specified manually with IOS_PLATFORM 56*da0073e9SAndroid Build Coastguard Workerif(NOT IOS_PLATFORM) 57*da0073e9SAndroid Build Coastguard Worker set(IOS_PLATFORM "OS") 58*da0073e9SAndroid Build Coastguard Workerendif(NOT IOS_PLATFORM) 59*da0073e9SAndroid Build Coastguard Workerset(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform") 60*da0073e9SAndroid Build Coastguard Worker 61*da0073e9SAndroid Build Coastguard Worker# Check the platform selection and setup for developer root 62*da0073e9SAndroid Build Coastguard Workerif(${IOS_PLATFORM} STREQUAL "OS") 63*da0073e9SAndroid Build Coastguard Worker set(IOS_PLATFORM_LOCATION "iPhoneOS.platform") 64*da0073e9SAndroid Build Coastguard Worker set(XCODE_IOS_PLATFORM iphoneos) 65*da0073e9SAndroid Build Coastguard Worker 66*da0073e9SAndroid Build Coastguard Worker # This causes the installers to properly locate the output libraries 67*da0073e9SAndroid Build Coastguard Worker set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos") 68*da0073e9SAndroid Build Coastguard Workerelseif(${IOS_PLATFORM} STREQUAL "SIMULATOR") 69*da0073e9SAndroid Build Coastguard Worker set(IOS_PLATFORM_LOCATION "iPhoneSimulator.platform") 70*da0073e9SAndroid Build Coastguard Worker set(XCODE_IOS_PLATFORM iphonesimulator) 71*da0073e9SAndroid Build Coastguard Worker 72*da0073e9SAndroid Build Coastguard Worker # This causes the installers to properly locate the output libraries 73*da0073e9SAndroid Build Coastguard Worker set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator") 74*da0073e9SAndroid Build Coastguard Workerelseif(${IOS_PLATFORM} STREQUAL "WATCHOS") 75*da0073e9SAndroid Build Coastguard Worker set(IOS_PLATFORM_LOCATION "WatchOS.platform") 76*da0073e9SAndroid Build Coastguard Worker set(XCODE_IOS_PLATFORM watchos) 77*da0073e9SAndroid Build Coastguard Worker 78*da0073e9SAndroid Build Coastguard Worker # This causes the installers to properly locate the output libraries 79*da0073e9SAndroid Build Coastguard Worker set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-watchos") 80*da0073e9SAndroid Build Coastguard Workerelse(${IOS_PLATFORM} STREQUAL "OS") 81*da0073e9SAndroid Build Coastguard Worker message(FATAL_ERROR 82*da0073e9SAndroid Build Coastguard Worker "Unsupported IOS_PLATFORM value selected. " 83*da0073e9SAndroid Build Coastguard Worker "Please choose OS, SIMULATOR, or WATCHOS.") 84*da0073e9SAndroid Build Coastguard Workerendif() 85*da0073e9SAndroid Build Coastguard Worker 86*da0073e9SAndroid Build Coastguard Worker# All iOS/Darwin specific settings - some may be redundant 87*da0073e9SAndroid Build Coastguard Workerset(CMAKE_SHARED_LIBRARY_PREFIX "lib") 88*da0073e9SAndroid Build Coastguard Workerset(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") 89*da0073e9SAndroid Build Coastguard Workerset(CMAKE_SHARED_MODULE_PREFIX "lib") 90*da0073e9SAndroid Build Coastguard Workerset(CMAKE_SHARED_MODULE_SUFFIX ".so") 91*da0073e9SAndroid Build Coastguard Workerset(CMAKE_MODULE_EXISTS 1) 92*da0073e9SAndroid Build Coastguard Workerset(CMAKE_DL_LIBS "") 93*da0073e9SAndroid Build Coastguard Worker 94*da0073e9SAndroid Build Coastguard Workerset(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") 95*da0073e9SAndroid Build Coastguard Workerset(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ") 96*da0073e9SAndroid Build Coastguard Workerset(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}") 97*da0073e9SAndroid Build Coastguard Workerset(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}") 98*da0073e9SAndroid Build Coastguard Worker 99*da0073e9SAndroid Build Coastguard Workerif(IOS_DEPLOYMENT_TARGET) 100*da0073e9SAndroid Build Coastguard Worker set(XCODE_IOS_PLATFORM_VERSION_FLAGS "-m${XCODE_IOS_PLATFORM}-version-min=${IOS_DEPLOYMENT_TARGET}") 101*da0073e9SAndroid Build Coastguard Workerendif() 102*da0073e9SAndroid Build Coastguard Worker 103*da0073e9SAndroid Build Coastguard Worker# Hidden visibilty is required for cxx on iOS 104*da0073e9SAndroid Build Coastguard Workerset(CMAKE_C_FLAGS_INIT "${XCODE_IOS_PLATFORM_VERSION_FLAGS}") 105*da0073e9SAndroid Build Coastguard Workerset(CMAKE_CXX_FLAGS_INIT "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -fvisibility-inlines-hidden") 106*da0073e9SAndroid Build Coastguard Worker 107*da0073e9SAndroid Build Coastguard Workerset(CMAKE_C_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}") 108*da0073e9SAndroid Build Coastguard Workerset(CMAKE_CXX_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}") 109*da0073e9SAndroid Build Coastguard Worker 110*da0073e9SAndroid Build Coastguard Workerset(CMAKE_PLATFORM_HAS_INSTALLNAME 1) 111*da0073e9SAndroid Build Coastguard Workerset(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names") 112*da0073e9SAndroid Build Coastguard Workerset(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names") 113*da0073e9SAndroid Build Coastguard Workerset(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,") 114*da0073e9SAndroid Build Coastguard Workerset(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,") 115*da0073e9SAndroid Build Coastguard Workerset(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a") 116*da0073e9SAndroid Build Coastguard Worker 117*da0073e9SAndroid Build Coastguard Worker# hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old build tree 118*da0073e9SAndroid Build Coastguard Worker# (where install_name_tool was hardcoded) and where CMAKE_INSTALL_NAME_TOOL isn't in the cache 119*da0073e9SAndroid Build Coastguard Worker# and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun) 120*da0073e9SAndroid Build Coastguard Worker# hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex 121*da0073e9SAndroid Build Coastguard Workerif(NOT CMAKE_INSTALL_NAME_TOOL) 122*da0073e9SAndroid Build Coastguard Worker find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool) 123*da0073e9SAndroid Build Coastguard Workerendif(NOT CMAKE_INSTALL_NAME_TOOL) 124*da0073e9SAndroid Build Coastguard Worker 125*da0073e9SAndroid Build Coastguard Worker# Setup iOS deployment target 126*da0073e9SAndroid Build Coastguard Workerset(IOS_DEPLOYMENT_TARGET ${IOS_DEPLOYMENT_TARGET} CACHE STRING "Minimum iOS version") 127*da0073e9SAndroid Build Coastguard Worker 128*da0073e9SAndroid Build Coastguard Worker# Setup iOS developer location unless specified manually with CMAKE_IOS_DEVELOPER_ROOT 129*da0073e9SAndroid Build Coastguard Worker# Note Xcode 4.3 changed the installation location, choose the most recent one available 130*da0073e9SAndroid Build Coastguard Workerexecute_process( 131*da0073e9SAndroid Build Coastguard Worker COMMAND /usr/bin/xcode-select -print-path 132*da0073e9SAndroid Build Coastguard Worker OUTPUT_VARIABLE CMAKE_XCODE_DEVELOPER_DIR 133*da0073e9SAndroid Build Coastguard Worker OUTPUT_STRIP_TRAILING_WHITESPACE 134*da0073e9SAndroid Build Coastguard Worker) 135*da0073e9SAndroid Build Coastguard Workerset(XCODE_POST_43_ROOT "${CMAKE_XCODE_DEVELOPER_DIR}/Platforms/${IOS_PLATFORM_LOCATION}/Developer") 136*da0073e9SAndroid Build Coastguard Workerset(XCODE_PRE_43_ROOT "/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer") 137*da0073e9SAndroid Build Coastguard Workerif(NOT CMAKE_IOS_DEVELOPER_ROOT) 138*da0073e9SAndroid Build Coastguard Worker if(EXISTS ${XCODE_POST_43_ROOT}) 139*da0073e9SAndroid Build Coastguard Worker set(CMAKE_IOS_DEVELOPER_ROOT ${XCODE_POST_43_ROOT}) 140*da0073e9SAndroid Build Coastguard Worker elseif(EXISTS ${XCODE_PRE_43_ROOT}) 141*da0073e9SAndroid Build Coastguard Worker set(CMAKE_IOS_DEVELOPER_ROOT ${XCODE_PRE_43_ROOT}) 142*da0073e9SAndroid Build Coastguard Worker endif(EXISTS ${XCODE_POST_43_ROOT}) 143*da0073e9SAndroid Build Coastguard Workerendif(NOT CMAKE_IOS_DEVELOPER_ROOT) 144*da0073e9SAndroid Build Coastguard Workerset(CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT} CACHE PATH "Location of iOS Platform") 145*da0073e9SAndroid Build Coastguard Worker 146*da0073e9SAndroid Build Coastguard Worker# Find and use the most recent iOS sdk unless specified manually with CMAKE_IOS_SDK_ROOT 147*da0073e9SAndroid Build Coastguard Workerif(NOT CMAKE_IOS_SDK_ROOT) 148*da0073e9SAndroid Build Coastguard Worker file(GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*") 149*da0073e9SAndroid Build Coastguard Worker if(_CMAKE_IOS_SDKS) 150*da0073e9SAndroid Build Coastguard Worker list(SORT _CMAKE_IOS_SDKS) 151*da0073e9SAndroid Build Coastguard Worker list(REVERSE _CMAKE_IOS_SDKS) 152*da0073e9SAndroid Build Coastguard Worker list(GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT) 153*da0073e9SAndroid Build Coastguard Worker else(_CMAKE_IOS_SDKS) 154*da0073e9SAndroid Build Coastguard Worker message(FATAL_ERROR "No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.") 155*da0073e9SAndroid Build Coastguard Worker endif(_CMAKE_IOS_SDKS) 156*da0073e9SAndroid Build Coastguard Worker message(STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}") 157*da0073e9SAndroid Build Coastguard Workerendif(NOT CMAKE_IOS_SDK_ROOT) 158*da0073e9SAndroid Build Coastguard Workerset(CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Location of the selected iOS SDK") 159*da0073e9SAndroid Build Coastguard Worker 160*da0073e9SAndroid Build Coastguard Worker# Set the sysroot default to the most recent SDK 161*da0073e9SAndroid Build Coastguard Workerset(CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS support") 162*da0073e9SAndroid Build Coastguard Worker 163*da0073e9SAndroid Build Coastguard Worker# set the architecture for iOS 164*da0073e9SAndroid Build Coastguard Workerif(IOS_PLATFORM STREQUAL "OS") 165*da0073e9SAndroid Build Coastguard Worker set(DEFAULT_IOS_ARCH "arm64") 166*da0073e9SAndroid Build Coastguard Workerelseif(IOS_PLATFORM STREQUAL "SIMULATOR") 167*da0073e9SAndroid Build Coastguard Worker set(DEFAULT_IOS_ARCH "arm64") 168*da0073e9SAndroid Build Coastguard Workerelseif(IOS_PLATFORM STREQUAL "WATCHOS") 169*da0073e9SAndroid Build Coastguard Worker set(DEFAULT_IOS_ARCH "armv7k;arm64_32") 170*da0073e9SAndroid Build Coastguard Workerendif() 171*da0073e9SAndroid Build Coastguard Worker 172*da0073e9SAndroid Build Coastguard Workerset(IOS_ARCH ${DEFAULT_IOS_ARCH} CACHE STRING "Build architecture for iOS") 173*da0073e9SAndroid Build Coastguard Workerset(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE STRING "Build architecture for iOS") 174*da0073e9SAndroid Build Coastguard Worker 175*da0073e9SAndroid Build Coastguard Worker# Set the find root to the iOS developer roots and to user defined paths 176*da0073e9SAndroid Build Coastguard Workerset(CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} CACHE STRING "iOS find search path root") 177*da0073e9SAndroid Build Coastguard Worker 178*da0073e9SAndroid Build Coastguard Worker# default to searching for frameworks first 179*da0073e9SAndroid Build Coastguard Workerset(CMAKE_FIND_FRAMEWORK FIRST) 180*da0073e9SAndroid Build Coastguard Worker 181*da0073e9SAndroid Build Coastguard Worker# set up the default search directories for frameworks 182*da0073e9SAndroid Build Coastguard Workerset(CMAKE_SYSTEM_FRAMEWORK_PATH 183*da0073e9SAndroid Build Coastguard Worker ${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks 184*da0073e9SAndroid Build Coastguard Worker ${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks 185*da0073e9SAndroid Build Coastguard Worker ${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks 186*da0073e9SAndroid Build Coastguard Worker) 187*da0073e9SAndroid Build Coastguard Worker 188*da0073e9SAndroid Build Coastguard Worker# only search the iOS sdks, not the remainder of the host filesystem 189*da0073e9SAndroid Build Coastguard Workerset(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) 190*da0073e9SAndroid Build Coastguard Workerset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 191*da0073e9SAndroid Build Coastguard Workerset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 192*da0073e9SAndroid Build Coastguard Worker 193*da0073e9SAndroid Build Coastguard Worker# This little macro lets you set any XCode specific property 194*da0073e9SAndroid Build Coastguard Workermacro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE) 195*da0073e9SAndroid Build Coastguard Worker set_property(TARGET ${TARGET} PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE}) 196*da0073e9SAndroid Build Coastguard Workerendmacro(set_xcode_property) 197*da0073e9SAndroid Build Coastguard Worker 198*da0073e9SAndroid Build Coastguard Worker# This macro lets you find executable programs on the host system 199*da0073e9SAndroid Build Coastguard Workermacro(find_host_package) 200*da0073e9SAndroid Build Coastguard Worker set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 201*da0073e9SAndroid Build Coastguard Worker set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) 202*da0073e9SAndroid Build Coastguard Worker set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) 203*da0073e9SAndroid Build Coastguard Worker set(IOS FALSE) 204*da0073e9SAndroid Build Coastguard Worker 205*da0073e9SAndroid Build Coastguard Worker find_package(${ARGN}) 206*da0073e9SAndroid Build Coastguard Worker 207*da0073e9SAndroid Build Coastguard Worker set(IOS TRUE) 208*da0073e9SAndroid Build Coastguard Worker set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) 209*da0073e9SAndroid Build Coastguard Worker set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 210*da0073e9SAndroid Build Coastguard Worker set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 211*da0073e9SAndroid Build Coastguard Workerendmacro(find_host_package) 212