Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions ports/lib3mf/fix-dependency-resolution-required.patch

This file was deleted.

12 changes: 12 additions & 0 deletions ports/lib3mf/linkage.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec1d7dd..c273eff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -293,7 +293,6 @@ if (USE_INCLUDED_ZLIB)
else()
set(_lib3mf_external_link_visibility PRIVATE)
if (NOT LIB3MF_BUILD_SHARED)
- set(_lib3mf_external_link_visibility PUBLIC)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is private with shared libs, then it is private also with static libs.
(I found no reference to libzip and zlib headers in installed headers.)

endif()

find_package(ZLIB QUIET)
12 changes: 12 additions & 0 deletions ports/lib3mf/pkgconfig.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/lib3mf.pc.in b/lib3mf.pc.in
index bb8030a..0117dd6 100644
--- a/lib3mf.pc.in
+++ b/lib3mf.pc.in
@@ -8,5 +8,6 @@ Description: @PROJECT_DESCRIPTION@
Version: @PROJECT_VERSION@

Requires:
-Libs: -L${libdir} -l3mf -lzip -lz
+Requires.private: libzip zlib
Copy link
Copy Markdown
Contributor Author

@dg0yt dg0yt Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no library z on vcpkg MSVC platforms.

+Libs: -L${libdir} -l3mf
Cflags: -I${includedir}
6 changes: 5 additions & 1 deletion ports/lib3mf/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ vcpkg_from_github(
SHA512 acfd0e4862248c475c674f7ee7855f809965a854e62ea0cd847008be7a9ca3c5a03ac87cac889f036555229762405094ca9811817dd45dbdaae941b5b41ae356
PATCHES
fix-lib3mf-config-root.patch
fix-dependency-resolution-required.patch
linkage.diff
pkgconfig.diff
)
file(REMOVE_RECURSE "${SOURCE_PATH}/Libraries") # vendored

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" _lib3mf_build_shared)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DLIB3MF_BUILD_SHARED=${_lib3mf_build_shared}
-DCMAKE_REQUIRE_FIND_PACKAGE_libzip=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_ZLIB=ON
-DUSE_INCLUDED_ZLIB=OFF
-DUSE_INCLUDED_LIBZIP=OFF
-DUSE_INCLUDED_SSL=OFF
Expand Down
5 changes: 3 additions & 2 deletions ports/lib3mf/usage
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ lib3mf provides CMake targets:
find_package(lib3mf CONFIG REQUIRED)
target_link_libraries(target_name PRIVATE lib3mf::lib3mf)

For examples and use cases, kindly check
https://github.com/3MFConsortium/lib3mf/tree/develop/SDK/CPackExamples
lib3mf provides pkg-config modules:

lib3mf
2 changes: 2 additions & 0 deletions ports/lib3mf/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name": "lib3mf",
"version": "2.5.0",
"port-version": 1,
"description": "lib3mf is an implementation of the 3D Manufacturing Format file standard",
"homepage": "https://github.com/3MFConsortium/lib3mf",
"documentation": "https://lib3mf.readthedocs.io/",
"license": "BSD-2-Clause",
"supports": "(windows & (x86 | x64)) | (linux & x64) | (osx & (x64 | arm64))",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4574,7 +4574,7 @@
},
"lib3mf": {
"baseline": "2.5.0",
"port-version": 0
"port-version": 1
},
"libaaplus": {
"baseline": "2.36",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/lib3mf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d6d8ac8b598ef28c1fd4d8cddea87b2807b89570",
"version": "2.5.0",
"port-version": 1
},
{
"git-tree": "91f325050cfa50f0961a1d9c37c04db13c46082c",
"version": "2.5.0",
Expand Down