Skip to content
Merged
20 changes: 20 additions & 0 deletions ports/lib3mf/fix-lib3mf-config-root.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/cmake/lib3mfConfig.cmake.in b/cmake/lib3mfConfig.cmake.in
index 589422b3..c8f05f44 100644
--- a/cmake/lib3mfConfig.cmake.in
+++ b/cmake/lib3mfConfig.cmake.in
@@ -23,8 +23,14 @@ if(NOT TARGET lib3mf::lib3mf)
return()
endif()

get_filename_component(_lib3mf_package_dir "${CMAKE_CURRENT_LIST_DIR}" ABSOLUTE)
-get_filename_component(LIB3MF_ROOT_DIR "${_lib3mf_package_dir}/../../.." ABSOLUTE)
+get_filename_component(_lib3mf_root_guess "${_lib3mf_package_dir}/../.." ABSOLUTE)
+if(EXISTS "${_lib3mf_root_guess}/include/Bindings")
+ set(LIB3MF_ROOT_DIR "${_lib3mf_root_guess}")
+else()
+ get_filename_component(LIB3MF_ROOT_DIR "${_lib3mf_package_dir}/../../.." ABSOLUTE)
+endif()
Comment thread
vijaiaeroastro marked this conversation as resolved.
Outdated
+
set(LIB3MF_CDYNAMIC_ADDITIONAL_SOURCE "${LIB3MF_ROOT_DIR}/include/Bindings/CDynamic/lib3mf_dynamic.cc")

set(_lib3mf_library_location_definition "LIB3MF_LIBRARY_LOCATION=\"$<TARGET_FILE:lib3mf::lib3mf>\"")
116 changes: 0 additions & 116 deletions ports/lib3mf/lib3mf_vcpkg.patch

This file was deleted.

26 changes: 16 additions & 10 deletions ports/lib3mf/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO 3MFConsortium/lib3mf
REF "v${VERSION}"
SHA512 91d3928315bd5d1a8553284505d28c7d839a3cbd8b07a87bca5a21087fffa8ba7a1738ed14313212815a09e33f7a82318f7b069f1bbe40456b57ec528379ab4b
PATCHES
lib3mf_vcpkg.patch
)
OUT_SOURCE_PATH SOURCE_PATH
REPO 3MFConsortium/lib3mf
REF "v${VERSION}"
SHA512 acfd0e4862248c475c674f7ee7855f809965a854e62ea0cd847008be7a9ca3c5a03ac87cac889f036555229762405094ca9811817dd45dbdaae941b5b41ae356
PATCHES
fix-lib3mf-config-root.patch
)

set(_lib3mf_build_shared OFF)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(_lib3mf_build_shared ON)
endif()
Comment thread
vijaiaeroastro marked this conversation as resolved.
Outdated

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
OPTIONS
-DLIB3MF_BUILD_SHARED=${_lib3mf_build_shared}
-DUSE_INCLUDED_ZLIB=OFF
-DUSE_INCLUDED_LIBZIP=OFF
-DUSE_INCLUDED_SSL=OFF
-DUSE_INCLUDED_CPPBASE64=OFF
-DUSE_INCLUDED_FASTFLOAT=OFF
-DBUILD_FOR_CODECOVERAGE=OFF
-DLIB3MF_TESTS=OFF
)
Expand Down
8 changes: 6 additions & 2 deletions ports/lib3mf/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{
"name": "lib3mf",
"version": "2.4.1",
"version": "2.5.0",
"description": "lib3mf is an implementation of the 3D Manufacturing Format file standard",
"homepage": "https://github.com/3MFConsortium/lib3mf",
"license": "BSD-2-Clause",
"supports": "(windows & (x86 | x64) & !static & !staticcrt) | (linux & x64) | (osx & (x64 | arm64))",
"supports": "(windows & (x86 | x64)) | (linux & x64) | (osx & (x64 | arm64))",
"dependencies": [
"cpp-base64",
"fast-float",
"libzip",
{
"name": "pkgconf",
"host": true
Comment thread
vijaiaeroastro marked this conversation as resolved.
Outdated
},
{
"name": "vcpkg-cmake",
"host": true
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4573,7 +4573,7 @@
"port-version": 0
},
"lib3mf": {
"baseline": "2.4.1",
"baseline": "2.5.0",
"port-version": 0
},
"libaaplus": {
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": "5c4f2bb0b65095f7243e69fde7b29591060d2a2c",
"version": "2.5.0",
"port-version": 0
},
{
"git-tree": "16dface0395187d431f9c27e4917f25d923d38d2",
"version": "2.4.1",
Expand Down