mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 13:10:07 +08:00
[libspatialindex] Update to 1.9.3 (#17506)
* update to 1.9.3 * update version * fix static build failed * Update ports/libspatialindex/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * format * Update libspatialindex.json * Update ports/libspatialindex/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update ports/libspatialindex/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update libspatialindex.json * Update ports/libspatialindex/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update libspatialindex.json Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
This commit is contained in:
parent
f116649874
commit
8c242b4457
@ -1,6 +0,0 @@
|
||||
Source: libspatialindex
|
||||
Version: 1.9.0
|
||||
Homepage: http://libspatialindex.github.com
|
||||
Description: C++ implementation of R*-tree, an MVR-tree and a TPR-tree with C API.
|
||||
Build-Depends: zlib
|
||||
|
@ -1,16 +1,18 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libspatialindex/libspatialindex
|
||||
REF 1.9.0
|
||||
SHA512 368537e9bfe52db96486a1febfabe035f9f7714fd1cb50450e3ab89d51c5ffffb0e2ea219e08bee34f772ba9813a3a7f9e63d8b8946887ce83811ef68d17d1cc
|
||||
REF 1.9.3
|
||||
SHA512 d4c608abbd631dc163b7b4fb6bf09dee3e85ce692a5f8875d51f05a26e09c75cd17dff1ed9d2c232a071f0f5864d21d877b4cbc252f3416896db24dfa3fa18cb
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
PATCHES
|
||||
static.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS -DCMAKE_DEBUG_POSTFIX=d -DSIDX_BUILD_TESTS:BOOL=OFF
|
||||
OPTIONS
|
||||
-DCMAKE_DEBUG_POSTFIX=d
|
||||
-DSIDX_BUILD_TESTS:BOOL=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
@ -21,5 +23,4 @@ vcpkg_copy_pdbs()
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libspatialindex)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libspatialindex/COPYING ${CURRENT_PACKAGES_DIR}/share/libspatialindex/copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
@ -1,21 +1,77 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c34ee8d71..84e4a9247 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -43,7 +43,7 @@ SET(SIDX_VERSION_MINOR "9")
|
||||
SET(SIDX_VERSION_PATCH "3")
|
||||
SET(SIDX_LIB_VERSION "6.1.1")
|
||||
SET(SIDX_LIB_SOVERSION "6")
|
||||
-SET(BUILD_SHARED_LIBS ON)
|
||||
+option(BUILD_SHARED_LIBS "Build shared libs" ON)
|
||||
|
||||
|
||||
set(SIDX_VERSION_STRING "${SIDX_VERSION_MAJOR}.${SIDX_VERSION_MINOR}.${SIDX_VERSION_PATCH}")
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index e6b733bd..8f227ab0 100644
|
||||
index 90f4501bc..aad327181 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -194,9 +194,13 @@ if (NOT WITH_STATIC_LASZIP)
|
||||
endif()
|
||||
endif()
|
||||
@@ -188,9 +188,13 @@ set(SIDX_SOURCES
|
||||
#endif()
|
||||
|
||||
-add_library(${SIDX_LIB_NAME} SHARED ${SIDX_SOURCES})
|
||||
|
||||
-add_library(${SIDX_LIB_NAME} ${SIDX_SOURCES})
|
||||
-
|
||||
-add_library(${SIDX_C_LIB_NAME} SHARED ${SIDX_CAPI_CPP})
|
||||
-add_library(${SIDX_C_LIB_NAME} ${SIDX_CAPI_CPP})
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
+ add_library(${SIDX_LIB_NAME} SHARED ${SIDX_SOURCES})
|
||||
+ add_library(${SIDX_C_LIB_NAME} SHARED ${SIDX_CAPI_CPP})
|
||||
+ add_library(${SIDX_LIB_NAME} SHARED ${SIDX_SOURCES})
|
||||
+ add_library(${SIDX_C_LIB_NAME} SHARED ${SIDX_CAPI_CPP})
|
||||
+else(BUILD_SHARED_LIBS)
|
||||
+ add_library(${SIDX_LIB_NAME} STATIC ${SIDX_SOURCES})
|
||||
+ add_library(${SIDX_C_LIB_NAME} STATIC ${SIDX_CAPI_CPP})
|
||||
+ add_library(${SIDX_LIB_NAME} STATIC ${SIDX_SOURCES})
|
||||
+ add_library(${SIDX_C_LIB_NAME} STATIC ${SIDX_CAPI_CPP})
|
||||
+endif(BUILD_SHARED_LIBS)
|
||||
|
||||
target_link_libraries(${SIDX_C_LIB_NAME}
|
||||
${SIDX_LIB_NAME}
|
||||
@@ -208,9 +212,10 @@ if(WIN32)
|
||||
target_compile_options(${SIDX_LIB_NAME} PRIVATE "/wd4068")
|
||||
target_compile_options(${SIDX_C_LIB_NAME} PRIVATE "/wd4068")
|
||||
|
||||
- target_compile_definitions(${SIDX_C_LIB_NAME} PRIVATE "-DSIDX_DLL_EXPORT=1")
|
||||
- target_compile_definitions(${SIDX_LIB_NAME} PRIVATE "-DSIDX_DLL_EXPORT=1")
|
||||
- if (NOT WITH_STATIC_SIDX)
|
||||
+ if (BUILD_SHARED_LIBS)
|
||||
+ target_compile_definitions(${SIDX_C_LIB_NAME} PRIVATE "-DSIDX_DLL_EXPORT=1")
|
||||
+ target_compile_definitions(${SIDX_LIB_NAME} PRIVATE "-DSIDX_DLL_EXPORT=1")
|
||||
+ else()
|
||||
target_compile_definitions(${SIDX_LIB_NAME} PRIVATE "-DSIDX_DLL_IMPORT=1")
|
||||
target_compile_definitions(${SIDX_C_LIB_NAME} PRIVATE "-DSIDX_DLL_IMPORT=1")
|
||||
endif()
|
||||
|
||||
diff --git a/include/spatialindex/capi/sidx_export.h b/include/spatialindex/capi/sidx_export.h
|
||||
index b6c84f1ef..7b0a39364 100644
|
||||
--- a/include/spatialindex/capi/sidx_export.h
|
||||
+++ b/include/spatialindex/capi/sidx_export.h
|
||||
@@ -29,7 +29,7 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef SIDX_C_DLL
|
||||
-#if defined(_MSC_VER)
|
||||
+#if defined(_MSC_VER) && defined(SIDX_DLL_EXPORT)
|
||||
# define SIDX_C_DLL __declspec(dllexport)
|
||||
# define SIDX_DLL __declspec(dllexport)
|
||||
#else
|
||||
|
||||
diff --git a/include/spatialindex/tools/Tools.h b/include/spatialindex/tools/Tools.h
|
||||
index 322bc819e..46b62fa00 100644
|
||||
--- a/include/spatialindex/tools/Tools.h
|
||||
+++ b/include/spatialindex/tools/Tools.h
|
||||
@@ -46,7 +46,7 @@
|
||||
#ifdef SIDX_DLL_EXPORT
|
||||
#define SIDX_DLL __declspec(dllexport)
|
||||
#else
|
||||
- #define SIDX_DLL __declspec(dllimport)
|
||||
+ #define SIDX_DLL
|
||||
#endif
|
||||
|
||||
// Nuke this annoying warning. See http://www.unknownroad.com/rtfm/VisualStudio/warningC4251.html
|
||||
|
9
ports/libspatialindex/vcpkg.json
Normal file
9
ports/libspatialindex/vcpkg.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "libspatialindex",
|
||||
"version": "1.9.3",
|
||||
"description": "C++ implementation of R*-tree, an MVR-tree and a TPR-tree with C API.",
|
||||
"homepage": "http://libspatialindex.github.com",
|
||||
"dependencies": [
|
||||
"zlib"
|
||||
]
|
||||
}
|
@ -3521,7 +3521,7 @@
|
||||
"port-version": 4
|
||||
},
|
||||
"libspatialindex": {
|
||||
"baseline": "1.9.0",
|
||||
"baseline": "1.9.3",
|
||||
"port-version": 0
|
||||
},
|
||||
"libspatialite": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "2e1fceafc0be5ea8fd1b2961104f46a5e29c9a6c",
|
||||
"version": "1.9.3",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "4313465aee191d0e9e0154f01beaf2e4e47a3e4f",
|
||||
"version-string": "1.9.0",
|
||||
|
Loading…
Reference in New Issue
Block a user