aboutsummaryrefslogtreecommitdiff
path: root/ports/libspatialindex/static.patch
diff options
context:
space:
mode:
authorLong Huan <8551701+longhuan2018@users.noreply.github.com>2021-05-27 06:02:26 +0800
committerGitHub <noreply@github.com>2021-05-26 15:02:26 -0700
commit8c242b4457233c82b679a0c4c638573e4833637b (patch)
tree4561b3b9a57dc916e4b4d306446ce1e612828fcd /ports/libspatialindex/static.patch
parentf11664987447346340de58c2be2dce551a188a46 (diff)
downloadvcpkg-8c242b4457233c82b679a0c4c638573e4833637b.tar.gz
vcpkg-8c242b4457233c82b679a0c4c638573e4833637b.zip
[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>
Diffstat (limited to 'ports/libspatialindex/static.patch')
-rw-r--r--ports/libspatialindex/static.patch76
1 files changed, 66 insertions, 10 deletions
diff --git a/ports/libspatialindex/static.patch b/ports/libspatialindex/static.patch
index bf783bcca..1ce2b9d6a 100644
--- a/ports/libspatialindex/static.patch
+++ b/ports/libspatialindex/static.patch
@@ -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