Merged PR 2853269: Provide platform-specific nuget packages for msix

CMake changes to enable creating independent nuget packages according to the platform.

Packages names are:
- Microsoft.MSIX.Packaging.n.n.n.nupkg
- Microsoft.MSIX.Packaging.AOSP.n.n.n.nupkg
- Microsoft.MSIX.Packaging.iOS.n.n.n.nupkg
- Microsoft.MSIX.Packaging.Linux.n.n.n.nupkg
- Microsoft.MSIX.Packaging.MacOS.n.n.n.nupkg
- Microsoft.MSIX.Packaging.Windows.n.n.n.nupkg

where n.n.n is the version of the SDK.

Other changes:
1. Fix bug where iOS couldn't find git, so the SDK version was always 0.0.0
2. Change iOS BVT to link agains libmsix.dylib and libmsixtestcommon.dylib instead of libmsix.0.0.0.dylib and libmsixtestcommon.0.0.0.dylib
3. Change testios.sh to exit if compiling the test app fails
4. Remove extra space between THIRD and PARTY in "THIRD PARTY CODE NOTICE" file name
5. Removed unnecessary cmakein files
This commit is contained in:
Ruben Guerrero Samaniego 2019-02-05 18:53:44 +00:00 коммит произвёл Rubén Guerrero Samaniego
Родитель 7c84b3fa66
Коммит 965ca5e953
11 изменённых файлов: 140 добавлений и 259 удалений

Просмотреть файл

@ -84,13 +84,28 @@ message(STATUS "MSIX Packaging SDK branch name ${GIT_BRANCH_NAME}")
add_definitions(-DSDK_VERSION="${MSIX_VERSION}")
# Configure Package.nuspec
if(WIN32)
set(MSIX_NUGET_NAME "Microsoft.MSIX.Packaging.Windows")
elseif(MACOS)
set(MSIX_NUGET_NAME "Microsoft.MSIX.Packaging.MacOS")
elseif(IOS)
set(MSIX_NUGET_NAME "Microsoft.MSIX.Packaging.iOS")
elseif(AOSP)
set(MSIX_NUGET_NAME "Microsoft.MSIX.Packaging.AOSP")
elseif(LINUX)
set(MSIX_NUGET_NAME "Microsoft.MSIX.Packaging.Linux")
else()
set(MSIX_NUGET_NAME "Microsoft.MSIX.Packaging") # cmake ..
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Package.nuspec.cmakein ${CMAKE_CURRENT_BINARY_DIR}/Package.nuspec CRLF)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Microsoft.MSIX.Packaging.targets ${CMAKE_BINARY_DIR}/build/native/Microsoft.MSIX.Packaging.targets)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Microsoft.MSIX.Packaging.targets ${CMAKE_BINARY_DIR}/build/native/${MSIX_NUGET_NAME}.targets)
message(STATUS "Package.Nuspec created")
message(STATUS "--------------------------------")
# Configure license txt
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/LICENSE ${CMAKE_BINARY_DIR}/build/LICENSE)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/THIRD\ PARTY\ CODE\ NOTICE ${CMAKE_BINARY_DIR}/build/THIRD\ PARTY\ CODE\ NOTICE)
message(STATUS "LICENSE created")
message(STATUS "--------------------------------")

Просмотреть файл

@ -2,7 +2,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)..\..\build\native\WIN32\src\msix;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>HAS_MSIX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>Microsoft.MSIX.Packaging</id>
<id>${MSIX_NUGET_NAME}</id>
<version>${MSIX_VERSION}</version>
<authors>psmith@microsoft.com, rubengu@microsoft.com, adrian.mascarenhas@microsoft.com</authors>
<owners>MSIXPackagingOSSCustomerQs@service.microsoft.com</owners>

Просмотреть файл

Просмотреть файл

@ -1,97 +0,0 @@
# - Returns a version string from Git
#
# These functions force a re-configure on each git commit so that you can
# trust the values of the variables in your build system.
#
# get_openssl_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])
#
# Returns the refspec and sha hash of the current head revision
#
# get_openssl_describe(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe on the source tree, and adjusting
# the output so that it tests false if an error occurs.
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
if(__get_openssl_revision_description)
return()
endif()
set(__get_openssl_revision_description YES)
# We must run the following at "include" time, not at function call time,
# to find the path to this module rather than the path to a calling list file
get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
function(get_openssl_head_revision _refspecvar _hashvar)
set(GIT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/openssl/.git")
file(READ ${GIT_DIR} submodule)
string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule})
get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE)
set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
if(NOT EXISTS "${GIT_DATA}")
file(MAKE_DIRECTORY "${GIT_DATA}")
endif()
if(NOT EXISTS "${GIT_DIR}/HEAD")
return()
endif()
set(HEAD_FILE "${GIT_DATA}/HEAD")
configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY)
configure_file("${_gitdescmoddir}/GetOpenSSLRevisionDescription.cmake.in"
"${GIT_DATA}/grabRef.cmake"
@ONLY)
include("${GIT_DATA}/grabRef.cmake")
set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE)
set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE)
endfunction()
function(get_openssl_describe _var)
if(NOT GIT_FOUND)
find_package(Git QUIET)
endif()
get_openssl_head_revision(refspec hash)
if(NOT GIT_FOUND)
set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
return()
endif()
if(NOT hash)
set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
return()
endif()
execute_process(COMMAND
"${GIT_EXECUTABLE}"
describe
${hash}
${ARGN}
WORKING_DIRECTORY
"${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE
res
OUTPUT_VARIABLE
out
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT res EQUAL 0)
set(out "${out}-${res}-NOTFOUND")
endif()
set(${_var} "${out}" PARENT_SCOPE)
endfunction()

Просмотреть файл

@ -1,41 +0,0 @@
#
# Internal file for GetOpenSSLRevisionDescription.cmake
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
set(HEAD_HASH)
file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
if(HEAD_CONTENTS MATCHES "ref")
# named branch
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
else()
configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}")
set(HEAD_HASH "${CMAKE_MATCH_1}")
endif()
endif()
else()
# detached HEAD
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
endif()
if(NOT HEAD_HASH)
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
string(STRIP "${HEAD_HASH}" HEAD_HASH)
endif()

Просмотреть файл

@ -1,162 +1,162 @@
# iOS CMAKE toolchain.
# Pieced together via ROME ios.cmake and LOTS of time searching through CMAKE documentation and various examples of other ios.cmake's
# out in the wild. Tested with xCode 9 and on MacOS 10.12
EXECUTE_PROCESS(COMMAND xcodebuild -version OUTPUT_VARIABLE XCODE_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REGEX MATCH "Xcode [0-9\\.]+" XCODE_VERSION "${XCODE_VERSION}")
STRING(REGEX REPLACE "Xcode ([0-9\\.]+)" "\\1" XCODE_VERSION "${XCODE_VERSION}")
MESSAGE(STATUS "Using Xcode version: ${XCODE_VERSION}")
execute_process(COMMAND xcodebuild -version OUTPUT_VARIABLE XCODE_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX MATCH "Xcode [0-9\\.]+" XCODE_VERSION "${XCODE_VERSION}")
string(REGEX REPLACE "Xcode ([0-9\\.]+)" "\\1" XCODE_VERSION "${XCODE_VERSION}")
message(STATUS "Using Xcode version: ${XCODE_VERSION}")
# Default to building for iPhoneOS if not specified otherwise as we cannot determine the platform from the CMAKE_OSX_ARCHITECTURES
# variable. Use of CMAKE_OSX_ARCHITECTURES is such that try_compile can correctly determine the value of IOS_PLATFORM from the root
# project, as CMAKE_OSX_ARCHITECTURES is propagated.
IF (NOT DEFINED IOS_PLATFORM)
IF (CMAKE_OSX_ARCHITECTURES)
IF (CMAKE_OSX_ARCHITECTURES MATCHES ".*arm.*")
SET(IOS_PLATFORM "OS")
SET(IOS_ARCH ${CMAKE_OSX_ARCHITECTURES})
ELSEIF (CMAKE_OSX_ARCHITECTURES MATCHES "i386")
SET(IOS_PLATFORM "SIMULATOR")
ELSEIF (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
SET(IOS_PLATFORM "SIMULATOR64")
ENDIF()
ENDIF()
if (NOT DEFINED IOS_PLATFORM)
if (CMAKE_OSX_ARCHITECTURES)
if (CMAKE_OSX_ARCHITECTURES MATCHES ".*arm.*")
set(IOS_PLATFORM "OS")
set(IOS_ARCH ${CMAKE_OSX_ARCHITECTURES})
elseif (CMAKE_OSX_ARCHITECTURES MATCHES "i386")
set(IOS_PLATFORM "SIMULATOR")
elseif (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
set(IOS_PLATFORM "SIMULATOR64")
endif()
endif()
IF (NOT IOS_PLATFORM)
SET(IOS_PLATFORM "OS")
ENDIF()
ENDIF()
SET(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS platform for which to build.")
if (NOT IOS_PLATFORM)
set(IOS_PLATFORM "OS")
endif()
endif()
set(IOS_PLATFORM ${IOS_PLATFORM} CACHE string "Type of iOS platform for which to build.")
# Determine the platform name and architectures for use in xcodebuild commands from the specified IOS_PLATFORM name.
IF (IOS_PLATFORM STREQUAL "OS")
SET(XCODE_IOS_PLATFORM iphoneos)
#SET(IOS_ARCH armv7 armv7s arm64)
ELSEIF (IOS_PLATFORM STREQUAL "SIMULATOR")
SET(XCODE_IOS_PLATFORM iphonesimulator)
SET(IOS_ARCH i386)
ELSEIF(IOS_PLATFORM STREQUAL "SIMULATOR64")
SET(XCODE_IOS_PLATFORM iphonesimulator)
SET(IOS_ARCH x86_64)
ELSE()
MESSAGE(FATAL_ERROR "Invalid IOS_PLATFORM: ${IOS_PLATFORM}")
ENDIF()
MESSAGE(STATUS "Configuring iOS build for platform: ${IOS_PLATFORM}, architecture(s): ${IOS_ARCH}")
if (IOS_PLATFORM STREQUAL "OS")
set(XCODE_IOS_PLATFORM iphoneos)
#set(IOS_ARCH armv7 armv7s arm64)
elseif (IOS_PLATFORM STREQUAL "SIMULATOR")
set(XCODE_IOS_PLATFORM iphonesimulator)
set(IOS_ARCH i386)
elseif(IOS_PLATFORM STREQUAL "SIMULATOR64")
set(XCODE_IOS_PLATFORM iphonesimulator)
set(IOS_ARCH x86_64)
else()
message(FATAL_ERROR "Invalid IOS_PLATFORM: ${IOS_PLATFORM}")
endif()
message(STATUS "Configuring iOS build for platform: ${IOS_PLATFORM}, architecture(s): ${IOS_ARCH}")
# If user did not specify the SDK root to use, then query xcodebuild for it.
EXECUTE_PROCESS(COMMAND xcodebuild -version -sdk ${XCODE_IOS_PLATFORM} Path OUTPUT_VARIABLE CMAKE_OSX_SYSROOT ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
IF (NOT EXISTS ${CMAKE_OSX_SYSROOT})
MESSAGE(FATAL_ERROR "Invalid CMAKE_OSX_SYSROOT: ${CMAKE_OSX_SYSROOT} does not exist.")
ENDIF()
MESSAGE (STATUS "Using SDK: ${CMAKE_OSX_SYSROOT} for platform: ${IOS_PLATFORM}")
execute_process(COMMAND xcodebuild -version -sdk ${XCODE_IOS_PLATFORM} Path OUTPUT_VARIABLE CMAKE_OSX_SYSROOT ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if (NOT EXISTS ${CMAKE_OSX_SYSROOT})
message(FATAL_ERROR "Invalid CMAKE_OSX_SYSROOT: ${CMAKE_OSX_SYSROOT} does not exist.")
endif()
message (STATUS "Using SDK: ${CMAKE_OSX_SYSROOT} for platform: ${IOS_PLATFORM}")
# Get the SDK version information.
EXECUTE_PROCESS(COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version SDKVersion OUTPUT_VARIABLE IOS_SDK_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version SDKVersion OUTPUT_VARIABLE IOS_SDK_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
# Find the Developer root for the specific iOS platform being compiled for from CMAKE_OSX_SYSROOT. Should be ../../ from SDK
# specified in CMAKE_OSX_SYSROOT. There does not appear to be a direct way to obtain this information from xcrun or xcodebuild.
IF (NOT CMAKE_IOS_DEVELOPER_ROOT)
if (NOT CMAKE_IOS_DEVELOPER_ROOT)
GET_FILENAME_COMPONENT(IOS_PLATFORM_SDK_DIR ${CMAKE_OSX_SYSROOT} PATH)
GET_FILENAME_COMPONENT(CMAKE_IOS_DEVELOPER_ROOT ${IOS_PLATFORM_SDK_DIR} PATH)
ENDIF()
endif()
IF (NOT EXISTS ${CMAKE_IOS_DEVELOPER_ROOT})
MESSAGE(FATAL_ERROR "Invalid CMAKE_IOS_DEVELOPER_ROOT: ${CMAKE_IOS_DEVELOPER_ROOT} does not exist.")
ENDIF()
if (NOT EXISTS ${CMAKE_IOS_DEVELOPER_ROOT})
message(FATAL_ERROR "Invalid CMAKE_IOS_DEVELOPER_ROOT: ${CMAKE_IOS_DEVELOPER_ROOT} does not exist.")
endif()
# Find the C & C++ compilers for the specified SDK.
IF (NOT CMAKE_C_COMPILER)
EXECUTE_PROCESS(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang OUTPUT_VARIABLE CMAKE_C_COMPILER ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
MESSAGE(STATUS "Using C compiler: ${CMAKE_C_COMPILER}")
ENDIF()
if (NOT CMAKE_C_COMPILER)
execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang OUTPUT_VARIABLE CMAKE_C_COMPILER ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Using C compiler: ${CMAKE_C_COMPILER}")
endif()
IF (NOT CMAKE_CXX_COMPILER)
EXECUTE_PROCESS(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang++ OUTPUT_VARIABLE CMAKE_CXX_COMPILER ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
MESSAGE(STATUS "Using CXX compiler: ${CMAKE_CXX_COMPILER}")
ENDIF()
if (NOT CMAKE_CXX_COMPILER)
execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang++ OUTPUT_VARIABLE CMAKE_CXX_COMPILER ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Using CXX compiler: ${CMAKE_CXX_COMPILER}")
endif()
# Find the correct version of libtool.
EXECUTE_PROCESS(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find libtool OUTPUT_VARIABLE IOS_LIBTOOL ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
MESSAGE(STATUS "Using libtool: ${IOS_LIBTOOL}")
execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find libtool OUTPUT_VARIABLE IOS_LIBTOOL ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Using libtool: ${IOS_LIBTOOL}")
# REQUIRED: Configure libtool to be used instead of ar + ranlib to build static libraries.
SET(CMAKE_C_CREATE_STATIC_LIBRARY "${IOS_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "${IOS_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
set(CMAKE_C_CREATE_STATIC_LIBRARY "${IOS_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
set(CMAKE_CXX_CREATE_STATIC_LIBRARY "${IOS_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
# Get the host OSX version.
EXECUTE_PROCESS(COMMAND uname -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND uname -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
# Standard settings.
SET(CMAKE_SYSTEM_NAME Darwin)
SET(CMAKE_SYSTEM_VERSION ${IOS_SDK_VERSION})
SET(UNIX TRUE)
SET(APPLE TRUE)
SET(IOS TRUE)
set(CMAKE_SYSTEM_NAME Darwin)
set(CMAKE_SYSTEM_VERSION ${IOS_SDK_VERSION})
set(UNIX TRUE)
set(APPLE TRUE)
set(IOS TRUE)
# Required: force unset of OS X-specific deployment target (otherwise autopopulated)
SET(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Must be empty for iOS builds." FORCE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE string "Must be empty for iOS builds." FORCE)
# Set up cross compilation flags
SET(CMAKE_C_COMPILER_FORCED TRUE)
SET(CMAKE_C_COMPILER_WORKS TRUE)
SET(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
SET(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
SET(CMAKE_CXX_COMPILER_FORCED TRUE)
SET(CMAKE_CXX_COMPILER_WORKS TRUE)
SET(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
SET(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
SET(CMAKE_DL_LIBS "")
SET(CMAKE_FIND_FRAMEWORK FIRST ) # Default to searching for frameworks first.
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
SET(CMAKE_MODULE_EXISTS 1)
SET(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE STRING "Build architecture for iOS")
set(CMAKE_C_COMPILER_FORCED TRUE)
set(CMAKE_C_COMPILER_WORKS TRUE)
set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
set(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
set(CMAKE_CXX_COMPILER_FORCED TRUE)
set(CMAKE_CXX_COMPILER_WORKS TRUE)
set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
set(CMAKE_DL_LIBS "")
set(CMAKE_FIND_FRAMEWORK FIRST ) # Default to searching for frameworks first.
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH ) # Both to be able to find Git
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
set(CMAKE_MODULE_EXISTS 1)
set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE string "Build architecture for iOS")
set(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
SET(CMAKE_SHARED_LIBRARY_PREFIX "lib")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names")
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names")
SET(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
SET(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
SET(CMAKE_SHARED_MODULE_PREFIX "lib")
SET(CMAKE_SHARED_MODULE_SUFFIX ".so")
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names")
set(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
set(CMAKE_SHARED_MODULE_PREFIX "lib")
set(CMAKE_SHARED_MODULE_SUFFIX ".so")
IF (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL install_name_tool)
ENDIF (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool)
endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
# Specify minimum version of deployment target. Unless specified, the latest SDK version is used by default.
SET(IOS_DEPLOYMENT_TARGET "${IOS_SDK_VERSION}" CACHE STRING "Minimum iOS version to build for." )
MESSAGE(STATUS "Building for minimum iOS version: ${IOS_DEPLOYMENT_TARGET} (SDK version: ${IOS_SDK_VERSION})")
set(IOS_DEPLOYMENT_TARGET "${IOS_SDK_VERSION}" CACHE string "Minimum iOS version to build for." )
message(STATUS "Building for minimum iOS version: ${IOS_DEPLOYMENT_TARGET} (SDK version: ${IOS_SDK_VERSION})")
# Xcode uses flags we can build directly from XCODE_IOS_PLATFORM.
SET(XCODE_IOS_PLATFORM_VERSION_FLAGS "-m${XCODE_IOS_PLATFORM}-version-min=${IOS_DEPLOYMENT_TARGET}")
set(XCODE_IOS_PLATFORM_VERSION_FLAGS "-m${XCODE_IOS_PLATFORM}-version-min=${IOS_DEPLOYMENT_TARGET}")
# required flags for C++ on iOS.
SET(CMAKE_C_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -fobjc-abi-version=2 -fobjc-arc ${CMAKE_C_FLAGS}")
SET(CMAKE_C_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
SET(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -fomit-frame-pointer -ffast-math ${CMAKE_CXX_FLAGS_RELEASE}")
SET(CMAKE_CXX_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
set(CMAKE_C_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -fobjc-abi-version=2 -fobjc-arc ${CMAKE_C_FLAGS}")
set(CMAKE_C_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -fomit-frame-pointer -ffast-math ${CMAKE_CXX_FLAGS_RELEASE}")
set(CMAKE_CXX_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
# In order to ensure that the updated compiler flags are used in try_compile() tests, we have to forcibly set them in the
# CMake cache, not merely set them in the local scope.
LIST(APPEND VARS_TO_FORCE_IN_CACHE
list(APPEND VARS_TO_FORCE_IN_CACHE
CMAKE_C_FLAGS
CMAKE_C_LINK_FLAGS
CMAKE_CXX_FLAGS
CMAKE_CXX_LINK_FLAGS
CMAKE_CXX_RELEASE)
FOREACH(VAR_TO_FORCE ${VARS_TO_FORCE_IN_CACHE})
SET(${VAR_TO_FORCE} "${${VAR_TO_FORCE}}" CACHE STRING "" FORCE)
ENDFOREACH()
foreach(VAR_TO_FORCE ${VARS_TO_FORCE_IN_CACHE})
set(${VAR_TO_FORCE} "${${VAR_TO_FORCE}}" CACHE string "" FORCE)
endforeach()
# Set the find root to the iOS developer roots and to user defined paths.
SET(CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_OSX_SYSROOT} ${CMAKE_PREFIX_PATH} CACHE string "iOS find search path root" FORCE)
set(CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_OSX_SYSROOT} ${CMAKE_PREFIX_PATH} CACHE string "iOS find search path root" FORCE)
# Set up the default search directories for frameworks.
SET(CMAKE_SYSTEM_FRAMEWORK_PATH
set(CMAKE_SYSTEM_FRAMEWORK_PATH
${CMAKE_OSX_SYSROOT}/System/Library/Frameworks
${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks
${CMAKE_OSX_SYSROOT}/Developer/Library/Frameworks)

Просмотреть файл

@ -231,7 +231,6 @@ endif()
# Set the build version. It will be used in the name of the lib, with corresponding
# symlinks created.
set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${MSIX_VERSION} # ${VERSION} was defined in the main CMakeLists.
FRAMEWORK FALSE
PUBLIC_HEADER "${LIB_PUBLIC_HEADERS}" # specify the public headers
)

Просмотреть файл

@ -62,6 +62,12 @@ xcrun simctl boot $device
# Build app and locate .app to install
xcodebuild -scheme $app -project $project -sdk $sdk
build_result=$?
if [ $build_result -ne 0 ]
then
exit 1
fi
# We are looking for something like "BUILD_ROOT = <appDir>"
appDir=`xcodebuild -showBuildSettings -project $project | grep BUILD_ROOT | awk '{print $3}'`
appDir=$appDir/Debug-iphonesimulator/$app.app

Просмотреть файл

@ -27,7 +27,6 @@ add_library(${PROJECT_NAME} SHARED MobileTests.cpp ../../api/ApiTests.cpp)
# Set the build version. It will be used in the name of the lib, with corresponding
# symlinks created. SOVERSION could also be specified for api version.
set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${MSIX_VERSION} # ${MSIX_VERSION} was defined in the main CMakeLists.
FRAMEWORK FALSE
)

Просмотреть файл

@ -1,4 +1,4 @@
// !$*UTF8*$!
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
@ -7,6 +7,10 @@
objects = {
/* Begin PBXBuildFile section */
4C14D5D52204CC2A0034C5CE /* libmsix.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C14D5D32204CC2A0034C5CE /* libmsix.dylib */; };
4C14D5D62204CC2A0034C5CE /* libmsixtestcommon.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C14D5D42204CC2A0034C5CE /* libmsixtestcommon.dylib */; };
4C14D5D72204CC400034C5CE /* libmsix.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C14D5D32204CC2A0034C5CE /* libmsix.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
4C14D5D82204CC400034C5CE /* libmsixtestcommon.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C14D5D42204CC2A0034C5CE /* libmsixtestcommon.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
4C7F376D20783FD2002942F4 /* BlockMapContainsPayloadPackage.appxbundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C7F375220783FC2002942F4 /* BlockMapContainsPayloadPackage.appxbundle */; };
4C7F376E20783FD2002942F4 /* BlockMapIsMissing.appxbundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C7F375320783FC2002942F4 /* BlockMapIsMissing.appxbundle */; };
4C7F376F20783FD2002942F4 /* BlockMapViolatesSchema.appxbundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C7F375420783FC2002942F4 /* BlockMapViolatesSchema.appxbundle */; };
@ -34,13 +38,9 @@
4C7F378520783FD2002942F4 /* PayloadPackageNotListedInManifest.appxbundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C7F376A20783FC2002942F4 /* PayloadPackageNotListedInManifest.appxbundle */; };
4C7F378620783FD2002942F4 /* SignedUntrustedCert-CERT_E_CHAINING.appxbundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C7F376B20783FC2002942F4 /* SignedUntrustedCert-CERT_E_CHAINING.appxbundle */; };
4C7F378720783FD2002942F4 /* StoreSigned_Desktop_x86_x64_MoviesTV.appxbundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C7F376C20783FC2002942F4 /* StoreSigned_Desktop_x86_x64_MoviesTV.appxbundle */; };
4C7F3789207848EC002942F4 /* libmsixtestcommon.0.0.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C7F3788207848EC002942F4 /* libmsixtestcommon.0.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
4C7F378B20784901002942F4 /* libmsix.0.0.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C7F378A20784901002942F4 /* libmsix.0.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
4C80CD9E216EE2B7008E3292 /* StoreSigned_Desktop_x64_MoviesTV.appx in Resources */ = {isa = PBXBuildFile; fileRef = 4C80CD9D216EE2B7008E3292 /* StoreSigned_Desktop_x64_MoviesTV.appx */; };
4C80CDA0216EE32A008E3292 /* StoreSigned_Desktop_x64_MoviesTV.appx in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C80CD9D216EE2B7008E3292 /* StoreSigned_Desktop_x64_MoviesTV.appx */; };
4CA491B521F26C4000F0ADB0 /* apitest_test_1.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4CA491B421F26C4000F0ADB0 /* apitest_test_1.txt */; };
4CA491B721F282CC00F0ADB0 /* libmsix.0.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7F378A20784901002942F4 /* libmsix.0.0.0.dylib */; };
4CA491B821F282CC00F0ADB0 /* libmsixtestcommon.0.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7F3788207848EC002942F4 /* libmsixtestcommon.0.0.0.dylib */; };
4CAC1C2E2135DCC0005C3B2C /* assets.appx in Resources */ = {isa = PBXBuildFile; fileRef = 4CAC1C1A2135DCC0005C3B2C /* assets.appx */; };
4CAC1C2F2135DCC0005C3B2C /* FlatBundleWithAsset.appxbundle in Resources */ = {isa = PBXBuildFile; fileRef = 4CAC1C1B2135DCC0005C3B2C /* FlatBundleWithAsset.appxbundle */; };
4CAC1C302135DCC0005C3B2C /* language-de.appx in Resources */ = {isa = PBXBuildFile; fileRef = 4CAC1C1C2135DCC0005C3B2C /* language-de.appx */; };
@ -231,8 +231,8 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
4C7F378B20784901002942F4 /* libmsix.0.0.0.dylib in CopyFiles */,
4C7F3789207848EC002942F4 /* libmsixtestcommon.0.0.0.dylib in CopyFiles */,
4C14D5D72204CC400034C5CE /* libmsix.dylib in CopyFiles */,
4C14D5D82204CC400034C5CE /* libmsixtestcommon.dylib in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -286,6 +286,8 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
4C14D5D32204CC2A0034C5CE /* libmsix.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libmsix.dylib; path = ../../../.vs/lib/libmsix.dylib; sourceTree = "<group>"; };
4C14D5D42204CC2A0034C5CE /* libmsixtestcommon.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libmsixtestcommon.dylib; path = ../../../.vs/lib/libmsixtestcommon.dylib; sourceTree = "<group>"; };
4C7F375220783FC2002942F4 /* BlockMapContainsPayloadPackage.appxbundle */ = {isa = PBXFileReference; lastKnownFileType = file; path = BlockMapContainsPayloadPackage.appxbundle; sourceTree = "<group>"; };
4C7F375320783FC2002942F4 /* BlockMapIsMissing.appxbundle */ = {isa = PBXFileReference; lastKnownFileType = file; path = BlockMapIsMissing.appxbundle; sourceTree = "<group>"; };
4C7F375420783FC2002942F4 /* BlockMapViolatesSchema.appxbundle */ = {isa = PBXFileReference; lastKnownFileType = file; path = BlockMapViolatesSchema.appxbundle; sourceTree = "<group>"; };
@ -313,8 +315,6 @@
4C7F376A20783FC2002942F4 /* PayloadPackageNotListedInManifest.appxbundle */ = {isa = PBXFileReference; lastKnownFileType = file; path = PayloadPackageNotListedInManifest.appxbundle; sourceTree = "<group>"; };
4C7F376B20783FC2002942F4 /* SignedUntrustedCert-CERT_E_CHAINING.appxbundle */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SignedUntrustedCert-CERT_E_CHAINING.appxbundle"; sourceTree = "<group>"; };
4C7F376C20783FC2002942F4 /* StoreSigned_Desktop_x86_x64_MoviesTV.appxbundle */ = {isa = PBXFileReference; lastKnownFileType = file; path = StoreSigned_Desktop_x86_x64_MoviesTV.appxbundle; sourceTree = "<group>"; };
4C7F3788207848EC002942F4 /* libmsixtestcommon.0.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libmsixtestcommon.0.0.0.dylib; path = ../../../.vs/lib/libmsixtestcommon.0.0.0.dylib; sourceTree = "<group>"; };
4C7F378A20784901002942F4 /* libmsix.0.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libmsix.0.0.0.dylib; path = ../../../.vs/lib/libmsix.0.0.0.dylib; sourceTree = "<group>"; };
4C80CD9D216EE2B7008E3292 /* StoreSigned_Desktop_x64_MoviesTV.appx */ = {isa = PBXFileReference; lastKnownFileType = file; path = StoreSigned_Desktop_x64_MoviesTV.appx; sourceTree = "<group>"; };
4CA491B421F26C4000F0ADB0 /* apitest_test_1.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = apitest_test_1.txt; path = ../../../.vs/test/api/input/apitest_test_1.txt; sourceTree = "<group>"; };
4CAC1C1A2135DCC0005C3B2C /* assets.appx */ = {isa = PBXFileReference; lastKnownFileType = file; path = assets.appx; sourceTree = "<group>"; };
@ -384,8 +384,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
4CA491B721F282CC00F0ADB0 /* libmsix.0.0.0.dylib in Frameworks */,
4CA491B821F282CC00F0ADB0 /* libmsixtestcommon.0.0.0.dylib in Frameworks */,
4C14D5D52204CC2A0034C5CE /* libmsix.dylib in Frameworks */,
4C14D5D62204CC2A0034C5CE /* libmsixtestcommon.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -439,6 +439,8 @@
4CA491B621F282CC00F0ADB0 /* Frameworks */ = {
isa = PBXGroup;
children = (
4C14D5D32204CC2A0034C5CE /* libmsix.dylib */,
4C14D5D42204CC2A0034C5CE /* libmsixtestcommon.dylib */,
);
name = Frameworks;
sourceTree = "<group>";
@ -476,8 +478,6 @@
children = (
4CA491B421F26C4000F0ADB0 /* apitest_test_1.txt */,
4CAC1C192135DCC0005C3B2C /* flat */,
4C7F378A20784901002942F4 /* libmsix.0.0.0.dylib */,
4C7F3788207848EC002942F4 /* libmsixtestcommon.0.0.0.dylib */,
4C7F375120783FC2002942F4 /* bundles */,
EEE4054D20225CDF007B25CE /* iOSBVT */,
EEE4054C20225CDF007B25CE /* Products */,