aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/msix
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/msix
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/msix')
-rw-r--r--vcpkg/ports/msix/CMakeLists.txt15
-rw-r--r--vcpkg/ports/msix/fix-dependency-catch2.patch22
-rw-r--r--vcpkg/ports/msix/install-cmake.patch37
-rw-r--r--vcpkg/ports/msix/portfile.cmake50
-rw-r--r--vcpkg/ports/msix/vcpkg.json22
5 files changed, 146 insertions, 0 deletions
diff --git a/vcpkg/ports/msix/CMakeLists.txt b/vcpkg/ports/msix/CMakeLists.txt
new file mode 100644
index 0000000..166d904
--- /dev/null
+++ b/vcpkg/ports/msix/CMakeLists.txt
@@ -0,0 +1,15 @@
+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/vcpkg/ports/msix/fix-dependency-catch2.patch b/vcpkg/ports/msix/fix-dependency-catch2.patch
new file mode 100644
index 0000000..4b20305
--- /dev/null
+++ b/vcpkg/ports/msix/fix-dependency-catch2.patch
@@ -0,0 +1,22 @@
+diff --git a/src/test/msixtest/CMakeLists.txt b/src/test/msixtest/CMakeLists.txt
+index e991231..e5c43ed 100644
+--- a/src/test/msixtest/CMakeLists.txt
++++ b/src/test/msixtest/CMakeLists.txt
+@@ -5,6 +5,8 @@
+ cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR)
+ project (msixtest)
+
++find_package(Catch2 CONFIG REQUIRED)
++
+ if(WIN32)
+ set(DESCRIPTION "msixtest manifest")
+ configure_file(${MSIX_PROJECT_ROOT}/manifest.cmakein ${MSIX_TEST_OUTPUT_DIRECTORY}/${PROJECT_NAME}.exe.manifest CRLF)
+@@ -91,7 +93,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES
+ )
+
+ add_dependencies(${PROJECT_NAME} msix)
+-target_link_libraries(${PROJECT_NAME} msix)
++target_link_libraries(${PROJECT_NAME} msix Catch2::Catch2)
+
+ # For windows copy the library
+ if(WIN32)
diff --git a/vcpkg/ports/msix/install-cmake.patch b/vcpkg/ports/msix/install-cmake.patch
new file mode 100644
index 0000000..e8f930f
--- /dev/null
+++ b/vcpkg/ports/msix/install-cmake.patch
@@ -0,0 +1,37 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 20098bf..38c3c95 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -190,3 +190,5 @@ message(STATUS "src processed")
+ add_subdirectory(sample)
+ message(STATUS "sample processed")
+ message(STATUS "DONE!")
++
++install(TARGETS msix)
+\ No newline at end of file
+diff --git a/src/msix/CMakeLists.txt b/src/msix/CMakeLists.txt
+index 296eda4..cf87993 100644
+--- a/src/msix/CMakeLists.txt
++++ b/src/msix/CMakeLists.txt
+@@ -87,9 +87,9 @@ endif()
+ include(msix_resources) # Handles all the certificates and schemas we are going to use.
+
+ 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
+ )
+
+ set(MsixSrc) # list with all the files we are going to use
+@@ -260,7 +260,7 @@ if(WIN32)
+ "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll")
+ string(REPLACE ";" " " DELAYFLAGS "${DELAYFLAGS}")
+ set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS "${DELAYFLAGS} /LTCG")
+- set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS " /DEF:windowsexports.def")
++ set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS " /DEF:${CMAKE_CURRENT_BINARY_DIR}/windowsexports.def")
+ if(USE_STATIC_MSVC)
+ if(CMAKE_BUILD_TYPE MATCHES Debug)
+ set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS " /NODEFAULTLIB:MSVCRTD")
diff --git a/vcpkg/ports/msix/portfile.cmake b/vcpkg/ports/msix/portfile.cmake
new file mode 100644
index 0000000..152e9d3
--- /dev/null
+++ b/vcpkg/ports/msix/portfile.cmake
@@ -0,0 +1,50 @@
+vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO microsoft/msix-packaging
+ REF ab322965d64baf1448548cbe18139e8872d686f2 # v1.7
+ SHA512 d64767c84d5933bf3d1e0e62e9dc21fa13e02b8cf31776ccbe2e7066e514798d8ff758dc2b6fd64f6eabcf3deb83ef0eaa03e1a7d407307f347a045e8a75d3dd
+ HEAD_REF master
+ PATCHES
+ install-cmake.patch
+ fix-dependency-catch2.patch
+)
+
+file(REMOVE_RECURSE "${SOURCE_PATH}/lib")
+file(MAKE_DIRECTORY "${SOURCE_PATH}/lib")
+configure_file("${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" "${SOURCE_PATH}/lib/CMakeLists.txt")
+
+if(VCPKG_TARGET_IS_WINDOWS)
+ set(PLATFORM WIN32)
+ set(CRYPTO_LIB crypt32)
+elseif(VCPKG_TARGET_IS_LINUX)
+ set(PLATFORM LINUX)
+ set(CRYPTO_LIB openssl)
+elseif(VCPKG_TARGET_IS_OSX)
+ set(PLATFORM MACOS)
+ set(CRYPTO_LIB openssl)
+else()
+ message(FATAL_ERROR "Unknown system: ${VCPKG_CMAKE_SYSTEM_NAME}")
+endif()
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ NO_CHARSET_FLAG
+ DISABLE_PARALLEL_CONFIGURE
+ OPTIONS
+ -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
+ -DINSTALL_LIBMSIX=ON
+ -DUSE_SHARED_ZLIB=ON
+ -D${PLATFORM}=ON
+ -DXML_PARSER=xerces
+ -DCRYPTO_LIB=${CRYPTO_LIB}
+)
+
+vcpkg_cmake_install()
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/msix/vcpkg.json b/vcpkg/ports/msix/vcpkg.json
new file mode 100644
index 0000000..c843d25
--- /dev/null
+++ b/vcpkg/ports/msix/vcpkg.json
@@ -0,0 +1,22 @@
+{
+ "name": "msix",
+ "version": "1.7",
+ "port-version": 5,
+ "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.",
+ "homepage": "https://github.com/microsoft/msix-packaging",
+ "license": "MIT",
+ "supports": "!static",
+ "dependencies": [
+ "catch2",
+ {
+ "name": "openssl",
+ "platform": "!uwp & !windows"
+ },
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ "xerces-c",
+ "zlib"
+ ]
+}