Skip to content
Closed
Show file tree
Hide file tree
Changes from 7 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
37 changes: 37 additions & 0 deletions ports/libgeotiff/fix-usage.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
diff --git a/libgeotiff/cmake/project-config.cmake.in b/libgeotiff/cmake/project-config.cmake.in
index 3690489..f0351e1 100644
--- a/libgeotiff/cmake/project-config.cmake.in
+++ b/libgeotiff/cmake/project-config.cmake.in
@@ -13,6 +13,9 @@
# @PROJECT_NAME_UPPER@_LIBRARY
# @PROJECT_NAME_UPPER@_LIBRARIES

+cmake_policy(PUSH)
+cmake_policy(SET CMP0012 NEW)

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.

CMake Warning (dev) at F:/vcpkg/installed/x64-windows/share/GeoTIFF/geotiff-config.cmake:26 (if):
  if given arguments:

    "ON"

  An argument named "ON" appears in a conditional statement.  Policy CMP0012
  is not set: if() recognizes numbers and boolean constants.  Run "cmake
  --help-policy CMP0012" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.
Call Stack (most recent call first):
  F:/vcpkg/scripts/buildsystems/vcpkg.cmake:824 (_find_package)
  CMakeLists.txt:251 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

+
# Tell the user project where to find our headers and libraries
get_filename_component (_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
get_filename_component (_ROOT "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE)
@@ -22,13 +25,14 @@ set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/bin")
unset (_ROOT)
unset (_DIR)

+include(CMakeFindDependencyMacro)
+@CONFIG_DEPENDENCIES@
+
set (@PROJECT_NAME@_LIBRARIES @GEOTIFF_LIBRARY_TARGET@)
if("@BUILD_SHARED_LIBS@")
set (@PROJECT_NAME@_SHARED_LIBRARIES ${@PROJECT_NAME@_LIBRARIES})
else()
set (@PROJECT_NAME@_STATIC_LIBRARIES ${@PROJECT_NAME@_LIBRARIES})
- include(CMakeFindDependencyMacro)
-@CONFIG_DEPENDENCIES@
endif()

if(NOT @PROJECT_NAME@_FIND_QUIETLY)
@@ -52,3 +56,5 @@ set (@PROJECT_NAME_UPPER@_FOUND 1)
set (@PROJECT_NAME_UPPER@_LIBRARIES ${@PROJECT_NAME@_LIBRARIES})
set (@PROJECT_NAME_UPPER@_INCLUDE_DIR ${@PROJECT_NAME@_INCLUDE_DIRS})
set (@PROJECT_NAME_UPPER@_LIBRARY ${@PROJECT_NAME@_LIBRARIES})
+
+cmake_policy(POP)
3 changes: 2 additions & 1 deletion ports/libgeotiff/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ vcpkg_from_github(
PATCHES
cmakelists.patch
skip-doc-install.patch
public-dependencies.patch
fix-usage.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand Down Expand Up @@ -43,4 +43,5 @@ endif()

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

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/libgeotiff/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
47 changes: 0 additions & 47 deletions ports/libgeotiff/public-dependencies.patch

This file was deleted.

2 changes: 1 addition & 1 deletion ports/libgeotiff/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libgeotiff",
"version": "1.7.1",
"port-version": 1,
"port-version": 2,
"description": "Libgeotiff is an open source library on top of libtiff for reading and writing GeoTIFF information tags.",
"homepage": "https://github.com/OSGeo/libgeotiff",
"license": "MIT",
Expand Down
22 changes: 22 additions & 0 deletions ports/liblas/fix-cmake-configure.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d246a88..b0417ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -107,7 +107,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBLAS_BUILD_OUTPUT_DIRECTORY})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBLAS_BUILD_OUTPUT_DIRECTORY})

file(READ "doc/index.txt" README )
-file(WRITE "README.txt" "${README}")
+file(WRITE "${CMAKE_BINARY_DIR}/README.txt" "${README}")

###############################################################################
# Platform and compiler specific settings
@@ -337,7 +337,7 @@ set(LIBLAS_DATA_DIR ${LIBLAS_DATA_SUBDIR})
###############################################################################
# Installation commands

-install(FILES AUTHORS COPYING INSTALL LICENSE.txt README.txt
+install(FILES AUTHORS COPYING INSTALL LICENSE.txt ${CMAKE_BINARY_DIR}/README.txt
DESTINATION ${LIBLAS_DATA_DIR}/doc)

###############################################################################
17 changes: 17 additions & 0 deletions ports/liblas/fix-usage.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/cmake/liblas-config.cmake.in b/cmake/liblas-config.cmake.in
index 175e997..4f3b1ba 100644
--- a/cmake/liblas-config.cmake.in
+++ b/cmake/liblas-config.cmake.in
@@ -12,6 +12,12 @@ message (STATUS "Reading ${CMAKE_CURRENT_LIST_FILE}")
# libLAS_VERSION is set by version file
message (STATUS "libLAS configuration, version " ${libLAS_VERSION})

+include(CMakeFindDependencyMacro)
+
+if (@WITH_GEOTIFF@)
+ find_dependency(GeoTIFF CONFIG)
+endif()
+
# Tell the user project where to find our headers and libraries
get_filename_component (_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
get_filename_component (PROJECT_ROOT_DIR "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE)
35 changes: 19 additions & 16 deletions ports/liblas/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
PATCHES
fix-boost-headers.patch
fix-cmake-configure.patch
fix-usage.patch
)

file(REMOVE ${SOURCE_PATH}/cmake/modules/FindPROJ4.cmake)
file(REMOVE ${SOURCE_PATH}/cmake/modules/FindGeoTIFF.cmake)
file(REMOVE "${SOURCE_PATH}/cmake/modules/FindPROJ4.cmake")
file(REMOVE "${SOURCE_PATH}/cmake/modules/FindGeoTIFF.cmake")

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_OSGEO4W=OFF # Disable osgeo4w
-DWITH_TESTS=OFF
Expand All @@ -28,24 +29,26 @@ vcpkg_configure_cmake(
-DCMAKE_DISABLE_FIND_PACKAGE_JPEG=${CMAKE_DISABLE_FIND_PACKAGE_JPEG}
)

vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()

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

if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/share/cmake/libLAS/liblas-depends.cmake)
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/share/cmake/libLAS/liblas-depends.cmake")

if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
else()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/libLAS)
vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/libLAS)
endif()

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

file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
5 changes: 5 additions & 0 deletions ports/liblas/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
liblas provides CMake targets:

# this is heuristically generated, and may not be correct
Comment thread
JackBoosY marked this conversation as resolved.
Outdated
find_package(libLAS CONFIG REQUIRED)
target_link_libraries(main PRIVATE liblas liblas_c)
13 changes: 11 additions & 2 deletions ports/liblas/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "liblas",
"version": "1.8.1",
"port-version": 9,
"port-version": 10,
"description": "A C/C++ library for reading and writing the very common LAS LiDAR format.",
"license": "MIT",
"dependencies": [
"boost-detail",
"boost-filesystem",
Expand All @@ -14,7 +15,15 @@
"boost-system",
"boost-thread",
"boost-uuid",
"libgeotiff"
"libgeotiff",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"jpeg": {
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3630,7 +3630,7 @@
},
"libgeotiff": {
"baseline": "1.7.1",
"port-version": 1
"port-version": 2
},
"libgit2": {
"baseline": "1.4.2",
Expand Down Expand Up @@ -3754,7 +3754,7 @@
},
"liblas": {
"baseline": "1.8.1",
"port-version": 9
"port-version": 10
},
"liblbfgs": {
"baseline": "1.10",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libgeotiff.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f697d6a9cc5682ce5a07b4cf8fe5ee4ef79ccf91",
"version": "1.7.1",
"port-version": 2
},
{
"git-tree": "aa303b0481fcc35024bae8af620ab2271ca9b5b2",
"version": "1.7.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/liblas.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ab40001a6fbade551bc2cc7e6fc6cb9648d035f1",
"version": "1.8.1",
"port-version": 10
},
{
"git-tree": "9d89f6e4515fcd144d24a7e619ea2de26799a005",
"version": "1.8.1",
Expand Down