Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
54 changes: 54 additions & 0 deletions ports/libe57/0001_cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
diff -Naur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2012-04-04 13:09:12.000000000 +0800
+++ b/CMakeLists.txt 2021-06-16 01:14:35.669163100 +0800
@@ -31,6 +31,8 @@
set(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/c_flag_overrides.cmake)
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/cmake/cxx_flag_overrides.cmake)

+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
# Set a private module find path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

@@ -81,17 +83,17 @@
endif(NOT Boost_FOUND)

set(Xerces_USE_STATIC_LIBS On)
-find_package(Xerces QUIET)
-if (NOT Xerces_FOUND)
+find_package(XercesC QUIET)
+if (NOT XercesC_FOUND)
set(XERCES_ROOT CACHE PATH "Location of the xerces library")
message(FATAL_ERROR
"Unable to find xerces library.
Please set the the XERCES_ROOT to point to the root of the xerces directory."
)
-endif (NOT Xerces_FOUND)
+endif (NOT XercesC_FOUND)

-set(XML_LIBRARIES ${Xerces_LIBRARY})
-set(XML_INCLUDE_DIRS ${Xerces_INCLUDE_DIR})
+set(XML_LIBRARIES ${XercesC_LIBRARY})
+set(XML_INCLUDE_DIRS ${XercesC_INCLUDE_DIR})

if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
add_definitions(-DLINUX)
@@ -187,12 +189,18 @@
add_executable( las2e57
src/tools/las2e57.cpp
)
+
+if (MSVC)
+ set(LAS2E57_EXTRA_LINK bcrypt)
+endif(MSVC)
+
target_link_libraries( las2e57
E57RefImpl
LASReader
time_conversion
${XML_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
+ ${LAS2E57_EXTRA_LINK}
)
add_executable( e57fields
src/tools/e57fields.cpp
51 changes: 51 additions & 0 deletions ports/libe57/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/E57RefImpl_src-1.1.312)
vcpkg_download_distfile(ARCHIVE
Comment thread
maz-1 marked this conversation as resolved.
Outdated
URLS "https://downloads.sourceforge.net/project/e57-3d-imgfmt/E57Refimpl-src/E57RefImpl_src-1.1.312.zip"
FILENAME "E57RefImpl_src-1.1.312.zip"
SHA512 c729cc3094131f115ddf9b8c24a9420c4ab9d16a4343acfefb42f997f4bf25247cd5563126271df2af95f103093b7f6b360dbade52c9e66ec39dd2f06e041eb7
)

vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
"0001_cmake.patch"
)

vcpkg_configure_cmake(
Comment thread
maz-1 marked this conversation as resolved.
Outdated
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)

file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/share/libe57)

vcpkg_install_cmake()
Comment thread
maz-1 marked this conversation as resolved.
Outdated
vcpkg_fixup_cmake_targets()
Comment thread
maz-1 marked this conversation as resolved.
Outdated
vcpkg_copy_pdbs()

vcpkg_copy_tools(
TOOL_NAMES e57fields e57unpack e57validate e57xmldump las2e57
AUTO_CLEAN
)

file(INSTALL ${SOURCE_PATH}/README.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL ${SOURCE_PATH}/src/refimpl/E57RefImplConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/e57refimpl/)

file(INSTALL ${SOURCE_PATH}/include/E57Simple.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/e57)
file(INSTALL ${SOURCE_PATH}/include/LASReader.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/e57)
file(INSTALL ${SOURCE_PATH}/include/time_conversion/time_conversion.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/e57/time_conversion)
file(INSTALL ${SOURCE_PATH}/include/time_conversion/basictypes.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/e57/time_conversion)
file(INSTALL ${SOURCE_PATH}/include/time_conversion/constants.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/e57/time_conversion)
file(INSTALL ${SOURCE_PATH}/include/time_conversion/gnss_error.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/e57/time_conversion)
Comment thread
maz-1 marked this conversation as resolved.
Outdated

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
Comment thread
maz-1 marked this conversation as resolved.
Outdated

file(REMOVE ${CURRENT_PACKAGES_DIR}/CHANGES.TXT)
file(REMOVE ${CURRENT_PACKAGES_DIR}/E57RefImplConfig.cmake)
file(REMOVE ${CURRENT_PACKAGES_DIR}/README.TXT)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/CHANGES.TXT)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/E57RefImplConfig.cmake)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/README.TXT)
21 changes: 21 additions & 0 deletions ports/libe57/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "libe57",
"version-semver": "1.1.312",
"description": "An open source implementation of the ASTM E2807 Standard Specification for 3D Imaging Data Exchange in the C++ language.",
"homepage": "http://www.libe57.org/",
"dependencies": [
"boost-crc",
"boost-filesystem",
"boost-format",
"boost-program-options",
"boost-system",
"boost-thread",
"boost-uuid",
"boost-variant",
{
"name": "icu",
"platform": "linux"
},
"xerces-c"
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3104,6 +3104,10 @@
"baseline": "1.2.6",
"port-version": 0
},
"libe57": {
"baseline": "1.1.312",
"port-version": 0
},
"libepoxy": {
"baseline": "1.5.5",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/l-/libe57.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "33740d7719efce750f00f8fb15d9e778aaf37c6e",
"version-semver": "1.1.312",
"port-version": 0
}
]
}