[shapelib] Fix shapelib usage (#22633)

* [shapelib] Fix shapelib usage

* update version
This commit is contained in:
JonLiu1993 2022-03-22 03:36:19 +08:00 committed by GitHub
parent bca99c46b0
commit ce5fa83c6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 3 deletions

View File

@ -0,0 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b3b3b51..ea3f129 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,8 +73,8 @@ set(
# Export build information to help other projects link installed
# shapelib software. Only one of these signatures is required
-# for the export_shp name.
-install(EXPORT export_shp DESTINATION ${CMAKE_INSTALL_SHP_DATADIR})
+# for the shpConfig name.
+install(EXPORT shpConfig DESTINATION ${CMAKE_INSTALL_SHP_DATADIR})
# Initial boilerplate done, now build library and executables.
@@ -127,12 +127,17 @@ if(USE_RPATH)
endif(USE_RPATH)
install(TARGETS shp
- EXPORT export_shp
+ EXPORT shpConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
+INSTALL(EXPORT shpConfig
+ DESTINATION share/shp
+)
+
+
# executables to be built and installed.
set(executables
shpcreate

View File

@ -1,7 +1,7 @@
{ {
"name": "shapelib", "name": "shapelib",
"version-string": "1.5.0", "version": "1.5.0",
"port-version": 2, "port-version": 3,
"description": "Shapefile C Library is simple C API for reading and writing ESRI Shapefiles", "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": [ "dependencies": [

View File

@ -6414,7 +6414,7 @@
}, },
"shapelib": { "shapelib": {
"baseline": "1.5.0", "baseline": "1.5.0",
"port-version": 2 "port-version": 3
}, },
"shiva": { "shiva": {
"baseline": "1.0", "baseline": "1.0",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "befbba83687abe4b10f1fb55ac5ccc344bd11084",
"version": "1.5.0",
"port-version": 3
},
{ {
"git-tree": "d70a93c1899b5607ca1894c66beacec5c1afec9c", "git-tree": "d70a93c1899b5607ca1894c66beacec5c1afec9c",
"version-string": "1.5.0", "version-string": "1.5.0",