Skip to content

Commit

Permalink
[shapelib] fix cmake export path (microsoft#21102)
Browse files Browse the repository at this point in the history
  • Loading branch information
autoantwort authored Nov 5, 2021
1 parent 6202817 commit b31b625
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 14 deletions.
23 changes: 12 additions & 11 deletions ports/shapelib/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@ vcpkg_extract_source_archive_ex(
option-build-test.patch
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TEST=OFF
)

vcpkg_install_cmake()
vcpkg_cmake_install()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
vcpkg_cmake_config_fixup(PACKAGE_NAME shp)

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

file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe")
if(EXES)
file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/shapelib)
file(COPY ${EXES} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/shapelib")
file(REMOVE ${EXES})
endif()

Expand All @@ -38,12 +39,12 @@ if(DEBUG_EXES)
endif()

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(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/shapelib)
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/shapelib")

vcpkg_copy_pdbs()
14 changes: 12 additions & 2 deletions ports/shapelib/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"name": "shapelib",
"version-string": "1.5.0",
"port-version": 1,
"port-version": 2,
"description": "Shapefile C Library is simple C API for reading and writing ESRI Shapefiles",
"homepage": "https://download.osgeo.org/shapelib"
"homepage": "https://download.osgeo.org/shapelib",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6186,7 +6186,7 @@
},
"shapelib": {
"baseline": "1.5.0",
"port-version": 1
"port-version": 2
},
"shiva": {
"baseline": "1.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/s-/shapelib.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d70a93c1899b5607ca1894c66beacec5c1afec9c",
"version-string": "1.5.0",
"port-version": 2
},
{
"git-tree": "e32017b2f39e66b09726e3207e85486a820b9930",
"version-string": "1.5.0",
Expand Down

0 comments on commit b31b625

Please sign in to comment.