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
13 changes: 5 additions & 8 deletions ports/openctm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ project(
VERSION 1.0.3
LANGUAGES C)

find_package(7zip CONFIG REQUIRED)

set(PUBLIC_HEADERS lib/openctm.h lib/openctmpp.h)

add_library(
Expand All @@ -12,19 +14,14 @@ add_library(
lib/compressMG2.c
lib/compressRAW.c
lib/openctm.c
lib/stream.c
lib/liblzma/Alloc.c
lib/liblzma/LzFind.c
lib/liblzma/LzmaDec.c
lib/liblzma/LzmaEnc.c
lib/liblzma/LzmaLib.c)
lib/stream.c)

target_include_directories(
openctm
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/lib>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/lib/liblzma>
$<INSTALL_INTERFACE:include>)
target_compile_definitions(openctm PRIVATE OPENCTM_BUILD LZMA_PREFIX_CTM)
target_link_libraries(openctm PRIVATE 7zip::7zip)
target_compile_definitions(openctm PRIVATE OPENCTM_BUILD)
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(openctm PUBLIC OPENCTM_STATIC)
endif()
Expand Down
4 changes: 3 additions & 1 deletion ports/openctm/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ vcpkg_from_sourceforge(
REF OpenCTM-1.0.3
SHA512 fdfa08d19ecbfea99ba01aa2032e941ed6313394a96bd69f8984c2d2d079d836c616471d2bdf6f40175e75659f3ad0ba41502bc3d8224091472f40893ea8746e
FILENAME "OpenCTM-1.0.3-src.tar.bz2"
PATCHES
use-7zip.patch
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
Expand All @@ -18,4 +20,4 @@ vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-openctm)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
24 changes: 24 additions & 0 deletions ports/openctm/use-7zip.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/lib/stream.c b/lib/stream.c
index 53b1b72..bb47c3b 100644
--- a/lib/stream.c
+++ b/lib/stream.c
@@ -310,8 +310,7 @@ int _ctmStreamWritePackedInts(_CTMcontext * self, CTMint * aData,
outProps,
&outPropsSize,
self->mCompressionLevel, // Level (0-9)
- 0, -1, -1, -1, -1, -1, // Default values (set by level)
- lzmaAlgo // Algorithm (0 = fast, 1 = normal)
+ 0, -1, -1, -1, -1, -1 // Default values (set by level)
);

// Free temporary array
@@ -477,8 +476,7 @@ int _ctmStreamWritePackedFloats(_CTMcontext * self, CTMfloat * aData,
outProps,
&outPropsSize,
self->mCompressionLevel, // Level (0-9)
- 0, -1, -1, -1, -1, -1, // Default values (set by level)
- lzmaAlgo // Algorithm (0 = fast, 1 = normal)
+ 0, -1, -1, -1, -1, -1 // Default values (set by level)
);

// Free temporary array
2 changes: 2 additions & 0 deletions ports/openctm/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"name": "openctm",
"version": "1.0.3",
"port-version": 1,
"description": "OpenCTM — the Open Compressed Triangle Mesh file format — is a file format, a software library and a tool set for compression of 3D triangle meshes.",
"homepage": "http://openctm.sourceforge.net/",
"license": "Zlib",
"dependencies": [
"7zip",
{
"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 @@ -6714,7 +6714,7 @@
},
"openctm": {
"baseline": "1.0.3",
"port-version": 0
"port-version": 1
},
"opencv": {
"baseline": "4.10.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/openctm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "92ac7a53f30a5fadc0cf5186f2d256c87d494471",
"version": "1.0.3",
"port-version": 1
},
{
"git-tree": "ea30144a8ad57cb95b0603de14e4dc8e9f7b2ea2",
"version": "1.0.3",
Expand Down