Merge pull request #5206 from Simverge/pdalc

[pdal-c] Add pdal-c port files
This commit is contained in:
Victor Romero 2019-01-23 16:27:52 -08:00 committed by GitHub
commit 69892980b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 81 additions and 0 deletions

4
ports/pdal-c/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: pdal-c
Version: 1.8-1
Description: C API for the Point Data Abstraction Library (PDAL)
Build-Depends: pdal

View File

@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1fbc4a4..c8a325a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,7 +23,8 @@ set(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "CMake RelWithDebInfo suffix")
set(PDALC_ENABLE_CODE_COVERAGE ON CACHE BOOL "Enable code coverage calculation")
set(PDALC_GCC_PARAM_GGC_MIN_HEAPSIZE "131072" CACHE STRING "GCC garbage collection minimum heap size")
-include(ObtainProjectVersion)
+set(${PROJECT_NAME}_VERSION "1.8")
+set(BUILD_ID "vcpkg build")
include_directories("${CMAKE_SOURCE_DIR}/source")
if(CMAKE_COMPILER_IS_GNUCXX)

View File

@ -0,0 +1,38 @@
# vcpkg portfile.cmake for pdal-c, the C API for PDAL
include(vcpkg_common_functions)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
message(STATUS "Warning: Static building will not support load data through plugins.")
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO PDAL/CAPI
REF 1.8
SHA512 6a5f4cb3d36b419f3cd195028c3e6dc17abf3cdb7495aa3df638bc1f842ba98243c73e051e9cfcd3afe22787309cb871374b152ded92e6e06f404cd7b1ae50bf
HEAD_REF master
PATCHES
${CMAKE_CURRENT_LIST_DIR}/fix-docs-version.patch
${CMAKE_CURRENT_LIST_DIR}/preserve-install-dir.patch
${CMAKE_CURRENT_LIST_DIR}/remove-tests.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DPDALC_ENABLE_CODE_COVERAGE:BOOL=OFF
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
# Remove headers from debug
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Install copyright
file(INSTALL ${SOURCE_PATH}/LICENSE.md
DESTINATION ${CURRENT_PACKAGES_DIR}/share/pdal-c
RENAME copyright
)

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1fbc4a4..075c86c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,8 +13,6 @@ set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
-# Install to the build directory
-set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}" CACHE STRING "CMake install prefix" FORCE)
# Use "d" suffix for debug builds
# Do not use a suffix for RelWithDebInfo

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1fbc4a4..e31e552 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,7 +44,3 @@ endif()
add_subdirectory("source/pdal")
add_subdirectory("doc")
-
-include(CTest)
-add_subdirectory("tests/data")
-add_subdirectory("tests/pdal")