aboutsummaryrefslogtreecommitdiff
path: root/ports/msix
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2019-05-21 21:00:24 -0700
committerGitHub <noreply@github.com>2019-05-21 21:00:24 -0700
commit33af90d42af68ef343edb00a69b1e11548a9e2e1 (patch)
treec338f44bd8a960e8eafc52b91f6a1f666a927512 /ports/msix
parente16f9c29a05aa178ce8a476a293723ab92f08f89 (diff)
downloadvcpkg-33af90d42af68ef343edb00a69b1e11548a9e2e1.tar.gz
vcpkg-33af90d42af68ef343edb00a69b1e11548a9e2e1.zip
[many ports] Updates 2019.05.19 (#6524)
Diffstat (limited to 'ports/msix')
-rw-r--r--ports/msix/CMakeLists.txt16
-rw-r--r--ports/msix/CONTROL4
-rw-r--r--ports/msix/install-cmake.patch50
-rw-r--r--ports/msix/portfile.cmake32
4 files changed, 60 insertions, 42 deletions
diff --git a/ports/msix/CMakeLists.txt b/ports/msix/CMakeLists.txt
index 4c193bbb3..166d9042b 100644
--- a/ports/msix/CMakeLists.txt
+++ b/ports/msix/CMakeLists.txt
@@ -1 +1,15 @@
-add_custom_target(LIBS) \ No newline at end of file
+cmake_minimum_required(VERSION 3.14)
+
+add_custom_target(LIBS)
+
+find_package(XercesC CONFIG REQUIRED)
+add_library(xerces-c INTERFACE IMPORTED GLOBAL)
+target_link_libraries(xerces-c INTERFACE XercesC::XercesC)
+
+find_package(ZLIB REQUIRED)
+
+add_library(zlib INTERFACE IMPORTED GLOBAL)
+add_library(zlibstatic INTERFACE IMPORTED GLOBAL)
+
+target_link_libraries(zlib INTERFACE ZLIB::ZLIB)
+target_link_libraries(zlibstatic INTERFACE ZLIB::ZLIB)
diff --git a/ports/msix/CONTROL b/ports/msix/CONTROL
index 12bc7af8b..ae41a6ba1 100644
--- a/ports/msix/CONTROL
+++ b/ports/msix/CONTROL
@@ -1,5 +1,5 @@
Source: msix
-Version: 1.0-1
-Build-Depends: xerces-c, zlib
+Version: MsixCoreInstaller-preview
+Build-Depends: xerces-c, zlib, openssl (!uwp&!windows)
Description: The MSIX Packaging SDK project is an effort to enable developers on a variety of platforms to pack and unpack packages for the purposes of distribution from either the Microsoft Store, or their own content distribution networks.
The MSIX Packaging APIs that a client app would use to interact with .msix/.appx packages are a subset of those documented here. See sample/ExtractContentsSample/ExtractContentsSample.cpp for additional details.
diff --git a/ports/msix/install-cmake.patch b/ports/msix/install-cmake.patch
index e44cc9b3c..d33613ae6 100644
--- a/ports/msix/install-cmake.patch
+++ b/ports/msix/install-cmake.patch
@@ -1,35 +1,27 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8ee0443..8c0a868 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -266,3 +266,5 @@ message(STATUS "sample processed")
+ add_subdirectory(test)
+ message(STATUS "tests processed")
+ message(STATUS "DONE!")
++
++install(TARGETS msix)
diff --git a/src/msix/CMakeLists.txt b/src/msix/CMakeLists.txt
-index 586c140..41a24ae 100644
+index 817040b..6b16b69 100644
--- a/src/msix/CMakeLists.txt
+++ b/src/msix/CMakeLists.txt
-@@ -129,6 +129,17 @@ set(LIB_SOURCES
- # Define the library
- add_library(${LIBRARY_NAME} SHARED ${LIB_SOURCES} ${LIB_PUBLIC_HEADERS} ${LIB_PRIVATE_HEADERS})
-
-+if(INSTALL_LIBMSIX)
-+ install(TARGETS ${LIBRARY_NAME}
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib
-+ )
-+ if(INSTALL_HEADERS)
-+ install(FILES ${LIB_PUBLIC_HEADERS} DESTINATION include)
-+ endif()
-+endif()
-+
- # specify that this library is to be built with C++14
- set_property(TARGET ${LIBRARY_NAME} PROPERTY CXX_STANDARD 14)
+@@ -164,9 +164,9 @@ message(STATUS "PAL: Compression = ${CompressionObject}")
+ include(msix_resources)
-@@ -149,8 +160,10 @@ include_directories(
- ${CMAKE_PROJECT_ROOT}/lib/xerces/src
+ set(LIB_PUBLIC_HEADERS
+- ../inc/AppxPackaging.hpp
+- ../inc/MSIXWindows.hpp
+- ../inc/MsixErrors.hpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/../inc/AppxPackaging.hpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/../inc/MSIXWindows.hpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/../inc/MsixErrors.hpp
)
--target_link_libraries(${PROJECT_NAME} PRIVATE zlibstatic)
--target_link_libraries(${PROJECT_NAME} PRIVATE xerces-c)
-+find_package(ZLIB REQUIRED)
-+find_package(XercesC REQUIRED)
-+target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB)
-+target_link_libraries(${PROJECT_NAME} PRIVATE XercesC::XercesC)
-
- IF(AOSP)
- target_link_libraries(${PROJECT_NAME} PRIVATE -latomic)
+ # Bundle specific files
diff --git a/ports/msix/portfile.cmake b/ports/msix/portfile.cmake
index 67424b13d..1445e5845 100644
--- a/ports/msix/portfile.cmake
+++ b/ports/msix/portfile.cmake
@@ -1,37 +1,49 @@
include(vcpkg_common_functions)
-vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
+vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/msix-packaging
- REF v1.0
- SHA512 11abf60da3414ce59f4347df8b2872ad6aa8a3c1e077f6e0be5c66ce90f14340cec5e58c30fb42ed17a10d5296dc0718bb8cddd665bdc20359bf7f0be4b0b4dc
+ REF MsixCoreInstaller-preview
+ SHA512 b034559da8e4d5fedc79b3ef65b6f8e9bca69c92f3d85096e7ea84a0e394fa04a92f84079524437ceebd6c006a12dac9cc2e46197154257bbf7449ded031d3e8
HEAD_REF master
+ PATCHES install-cmake.patch
)
file(REMOVE_RECURSE ${SOURCE_PATH}/lib)
file(MAKE_DIRECTORY ${SOURCE_PATH}/lib)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/lib)
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/install-cmake.patch
-)
+if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ set(PLATFORM WIN32)
+ set(CRYPTO_LIB crypt32)
+elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(PLATFORM LINUX)
+ set(CRYPTO_LIB openssl)
+elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ set(PLATFORM MACOS)
+ set(CRYPTO_LIB openssl)
+else()
+ message(FATAL_ERROR "Unknown system: ${VCPKG_CMAKE_SYSTEM_NAME}")
+endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
- -DWIN32=ON
-DINSTALL_LIBMSIX=ON
- OPTIONS_RELEASE
- -DINSTALL_HEADERS=ON
+ -DUSE_SHARED_ZLIB=ON
+ -D${PLATFORM}=ON
+ -DXML_PARSER=xerces
+ -DCRYPTO_LIB=${CRYPTO_LIB}
)
vcpkg_install_cmake()
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
file(INSTALL
${SOURCE_PATH}/LICENSE
DESTINATION ${CURRENT_PACKAGES_DIR}/share/msix RENAME copyright)