Spaces:
Sleeping
Sleeping
48de7caa65e5ba68d81cc86c7769e819c3175c112c22665ca906f1719227da50
Browse files- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdal/0009-atlbase.patch +72 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdal/0010-symprefix.patch +13 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdal/dependency_win.cmake +219 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdal/portfile.cmake +376 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdal/usage +5 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdal/vcpkg-cmake-wrapper.cmake +151 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdal/vcpkg.json +125 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdcm/Fix-Cmake_DIR.patch +41 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdcm/fix-share-path.patch +32 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdcm/portfile.cmake +62 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdcm/use-openjpeg-config.patch +16 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdcm/vcpkg.json +21 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdcm2/portfile.cmake +1 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdcm2/vcpkg.json +10 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdk-pixbuf/fix_build.patch +67 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdk-pixbuf/fix_build_error_windows.patch +21 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdk-pixbuf/portfile.cmake +71 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdk-pixbuf/vcpkg.json +22 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gemmlowp/portfile.cmake +22 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gemmlowp/vcpkg.json +17 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/genann/CMakeLists.txt +25 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/genann/portfile.cmake +25 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/genann/vcpkg.json +7 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geogram/Config.cmake.in +4 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geogram/fix-vcpkg-install.patch +211 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geogram/portfile.cmake +81 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geogram/vcpkg.json +20 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geographiclib/cxx-library-only.patch +139 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geographiclib/portfile.cmake +49 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geographiclib/usage +4 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geographiclib/vcpkg.json +13 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geos/disable-warning-4996.patch +13 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geos/fix-exported-config.patch +76 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geos/install-hpp-files.patch +13 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geos/portfile.cmake +79 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geos/usage +10 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geos/vcpkg.json +16 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geotrans/CMakeLists.txt +151 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geotrans/geotrans-config.in.cmake +7 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geotrans/portfile.cmake +37 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geotrans/usage +11 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/geotrans/vcpkg.json +8 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/getdns/disable-docs.patch +42 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/getdns/portfile.cmake +52 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/getdns/vcpkg.json +31 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/getopt-win32/getopt.h.patch +50 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/getopt-win32/portfile.cmake +48 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/getopt-win32/vcpkg.json +9 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/getopt/portfile.cmake +5 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/getopt/vcpkg.json +13 -0
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdal/0009-atlbase.patch
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/gdal/nmake.opt b/gdal/nmake.opt
|
2 |
+
index 7e7871e..ac01bf2 100644
|
3 |
+
--- a/gdal/nmake.opt
|
4 |
+
+++ b/gdal/nmake.opt
|
5 |
+
@@ -239,6 +239,11 @@ STDCALL=YES
|
6 |
+
VERSION = 304
|
7 |
+
!ENDIF
|
8 |
+
|
9 |
+
+# Set HAVE_ATLBASE_H=NO if atlbase.h header is not available
|
10 |
+
+!IFNDEF HAVE_ATLBASE_H
|
11 |
+
+HAVE_ATLBASE_H=YES
|
12 |
+
+!ENDIF
|
13 |
+
+
|
14 |
+
# Comment the following out if you want PAM supported disabled
|
15 |
+
# by default.
|
16 |
+
!IFNDEF PAM_SETTING
|
17 |
+
diff --git a/gdal/port/cpl_aws.cpp b/gdal/port/cpl_aws.cpp
|
18 |
+
index eed23f9..e3a1578 100644
|
19 |
+
--- a/gdal/port/cpl_aws.cpp
|
20 |
+
+++ b/gdal/port/cpl_aws.cpp
|
21 |
+
@@ -43,7 +43,7 @@ CPL_CVSID("$Id$")
|
22 |
+
// #define DEBUG_VERBOSE 1
|
23 |
+
|
24 |
+
#ifdef WIN32
|
25 |
+
-#if defined(_MSC_VER)
|
26 |
+
+#if defined(HAVE_ATLBASE_H)
|
27 |
+
bool CPLFetchWindowsProductUUID(CPLString &osStr); // defined in cpl_aws_win32.cpp
|
28 |
+
#endif
|
29 |
+
const char* CPLGetWineVersion(); // defined in cpl_vsil_win32.cpp
|
30 |
+
@@ -688,7 +688,7 @@ static bool IsMachinePotentiallyEC2Instance()
|
31 |
+
}
|
32 |
+
else
|
33 |
+
{
|
34 |
+
-#if defined(_MSC_VER)
|
35 |
+
+#if defined(HAVE_ATLBASE_H)
|
36 |
+
CPLString osMachineUUID;
|
37 |
+
if( CPLFetchWindowsProductUUID(osMachineUUID) )
|
38 |
+
{
|
39 |
+
diff --git a/gdal/port/cpl_aws_win32.cpp b/gdal/port/cpl_aws_win32.cpp
|
40 |
+
index 7742a35..98be522 100644
|
41 |
+
--- a/gdal/port/cpl_aws_win32.cpp
|
42 |
+
+++ b/gdal/port/cpl_aws_win32.cpp
|
43 |
+
@@ -28,7 +28,7 @@
|
44 |
+
|
45 |
+
#include "cpl_port.h"
|
46 |
+
|
47 |
+
-#if defined(WIN32) && defined(_MSC_VER)
|
48 |
+
+#if defined(HAVE_ATLBASE_H)
|
49 |
+
|
50 |
+
#define _WIN32_DCOM
|
51 |
+
#include <iostream>
|
52 |
+
@@ -140,4 +140,4 @@ bool CPLFetchWindowsProductUUID(CPLString &osStr)
|
53 |
+
return !osWindowsProductUUID.empty();
|
54 |
+
}
|
55 |
+
|
56 |
+
-#endif /* defined(WIN32) && defined(_MSC_VER) */
|
57 |
+
+#endif /* defined(HAVE_ATLBASE_H) */
|
58 |
+
diff --git a/gdal/port/makefile.vc b/gdal/port/makefile.vc
|
59 |
+
index a8b0e02..68da2dd 100644
|
60 |
+
--- a/gdal/port/makefile.vc
|
61 |
+
+++ b/gdal/port/makefile.vc
|
62 |
+
@@ -141,6 +141,10 @@ EXTRAFLAGS = $(EXTRAFLAGS) $(LZ4_CFLAGS) -DHAVE_LZ4
|
63 |
+
ODBC_OBJ = cpl_odbc.obj
|
64 |
+
!ENDIF
|
65 |
+
|
66 |
+
+!IF "$(HAVE_ATLBASE_H)" == "YES"
|
67 |
+
+EXTRAFLAGS = $(EXTRAFLAGS) -DHAVE_ATLBASE_H
|
68 |
+
+!ENDIF
|
69 |
+
+
|
70 |
+
default: prev_dllbuild cpl_config.h $(LIB)
|
71 |
+
|
72 |
+
$(LIB): $(OBJ)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdal/0010-symprefix.patch
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/gdal/makefile.vc b/gdal/makefile.vc
|
2 |
+
index 9de546c..56f617d 100644
|
3 |
+
--- a/gdal/makefile.vc
|
4 |
+
+++ b/gdal/makefile.vc
|
5 |
+
@@ -27,7 +27,7 @@ OGR_INCLUDE = $(OGR_BASE_INCLUDE) \
|
6 |
+
CPPFLAGS = $(CPPFLAGS) -DGNM_ENABLED
|
7 |
+
!ENDIF
|
8 |
+
|
9 |
+
-!IF DEFINED(STDCALL) && !DEFINED(WIN64)
|
10 |
+
+!IF DEFINED(STDCALL) && !DEFINED(WIN64) && "$(SYM_PREFIX)" == "_"
|
11 |
+
|
12 |
+
BASE_INCLUDE = /INCLUDE:_GDALSimpleImageWarp@36 \
|
13 |
+
/INCLUDE:_GDALReprojectImage@48 \
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdal/dependency_win.cmake
ADDED
@@ -0,0 +1,219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
macro(find_dependency_win)
|
2 |
+
# curl
|
3 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX CURL MODULES --msvc-syntax libcurl INCLUDE_DIRS LIBS)
|
4 |
+
list(APPEND NMAKE_OPTIONS_REL "CURL_INC=${CURL_INCLUDE_DIRS_RELEASE}" "CURL_LIB=${CURL_LIBS_RELEASE}")
|
5 |
+
list(APPEND NMAKE_OPTIONS_DBG "CURL_INC=${CURL_INCLUDE_DIRS_DEBUG}" "CURL_LIB=${CURL_LIBS_DEBUG}")
|
6 |
+
|
7 |
+
# expat
|
8 |
+
list(APPEND NMAKE_OPTIONS "EXPAT_DIR=YES")
|
9 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX EXPAT MODULES --msvc-syntax expat INCLUDE_DIRS LIBS)
|
10 |
+
list(APPEND NMAKE_OPTIONS_REL "EXPAT_INCLUDE=${EXPAT_INCLUDE_DIRS}" "EXPAT_LIB=${EXPAT_LIBS_RELEASE}")
|
11 |
+
list(APPEND NMAKE_OPTIONS_DBG "EXPAT_INCLUDE=${EXPAT_INCLUDE_DIRS}" "EXPAT_LIB=${EXPAT_LIBS_DEBUG}")
|
12 |
+
|
13 |
+
# geos
|
14 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX GEOS MODULES --msvc-syntax geos INCLUDE_DIRS LIBS)
|
15 |
+
list(APPEND NMAKE_OPTIONS_REL "GEOS_CFLAGS=${GEOS_INCLUDE_DIRS_RELEASE} -DHAVE_GEOS" "GEOS_LIB=${GEOS_LIBS_RELEASE}")
|
16 |
+
list(APPEND NMAKE_OPTIONS_DBG "GEOS_CFLAGS=${GEOS_INCLUDE_DIRS_DEBUG} -DHAVE_GEOS" "GEOS_LIB=${GEOS_LIBS_DEBUG}")
|
17 |
+
|
18 |
+
# libgeotiff
|
19 |
+
list(APPEND NMAKE_OPTIONS "GEOTIFF_INC=-I${CURRENT_INSTALLED_DIR}/include")
|
20 |
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
21 |
+
list(APPEND NMAKE_OPTIONS_REL "GEOTIFF_LIB=${CURRENT_INSTALLED_DIR}/lib/geotiff_i.lib")
|
22 |
+
list(APPEND NMAKE_OPTIONS_DBG "GEOTIFF_LIB=${CURRENT_INSTALLED_DIR}/debug/lib/geotiff_d_i.lib")
|
23 |
+
else()
|
24 |
+
# libgeotiff may need tiff and proj4, but these are added separately, with all transitive deps.
|
25 |
+
list(APPEND NMAKE_OPTIONS_REL "GEOTIFF_LIB=${CURRENT_INSTALLED_DIR}/lib/geotiff.lib")
|
26 |
+
list(APPEND NMAKE_OPTIONS_DBG "GEOTIFF_LIB=${CURRENT_INSTALLED_DIR}/debug/lib/geotiff_d.lib")
|
27 |
+
endif()
|
28 |
+
|
29 |
+
# libiconv
|
30 |
+
# There is no pc file, and CMake added the Find module in version 3.11.
|
31 |
+
list(APPEND extra_exports ICONV)
|
32 |
+
set(ICONV_LIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/lib/charset.lib")
|
33 |
+
set(ICONV_LIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib")
|
34 |
+
list(APPEND NMAKE_OPTIONS "LIBICONV_INCLUDE=-I${CURRENT_INSTALLED_DIR}/include" "LIBICONV_CFLAGS=-DICONV_CONST=")
|
35 |
+
list(APPEND NMAKE_OPTIONS_REL "LIBICONV_LIBRARY=${ICONV_LIBS_RELEASE}")
|
36 |
+
list(APPEND NMAKE_OPTIONS_DBG "LIBICONV_LIBRARY=${ICONV_LIBS_DEBUG}")
|
37 |
+
|
38 |
+
# libjpeg-turbo
|
39 |
+
list(APPEND NMAKE_OPTIONS "JPEG_EXTERNAL_LIB=1" "JPEGDIR=${CURRENT_INSTALLED_DIR}/include")
|
40 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX JPEG MODULES --msvc-syntax libjpeg LIBS)
|
41 |
+
list(APPEND NMAKE_OPTIONS_REL "JPEG_LIB=${JPEG_LIBS_RELEASE}")
|
42 |
+
list(APPEND NMAKE_OPTIONS_DBG "JPEG_LIB=${JPEG_LIBS_DEBUG}")
|
43 |
+
|
44 |
+
# liblzma
|
45 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX LZMA MODULES --msvc-syntax liblzma INCLUDE_DIRS LIBS)
|
46 |
+
list(APPEND NMAKE_OPTIONS_REL "LZMA_CFLAGS=${LZMA_INCLUDE_DIRS_RELEASE}" "LZMA_LIBS=${LZMA_LIBS_RELEASE}")
|
47 |
+
list(APPEND NMAKE_OPTIONS_DBG "LZMA_CFLAGS=${LZMA_INCLUDE_DIRS_DEBUG}" "LZMA_LIBS=${LZMA_LIBS_DEBUG}")
|
48 |
+
|
49 |
+
# libpng
|
50 |
+
list(APPEND NMAKE_OPTIONS "PNG_EXTERNAL_LIB=1" "PNGDIR=${CURRENT_INSTALLED_DIR}/include")
|
51 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX PNG MODULES --msvc-syntax libpng LIBS)
|
52 |
+
list(APPEND NMAKE_OPTIONS_REL "PNG_LIB=${PNG_LIBS_RELEASE}")
|
53 |
+
list(APPEND NMAKE_OPTIONS_DBG "PNG_LIB=${PNG_LIBS_DEBUG}")
|
54 |
+
|
55 |
+
# libwebp
|
56 |
+
list(APPEND NMAKE_OPTIONS "WEBP_ENABLED=YES")
|
57 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX WEBP MODULES --msvc-syntax libwebp INCLUDE_DIRS LIBS)
|
58 |
+
list(APPEND NMAKE_OPTIONS_REL "WEBP_CFLAGS=${WEBP_INCLUDE_DIRS_RELEASE}" "WEBP_LIBS=${WEBP_LIBS_RELEASE}")
|
59 |
+
list(APPEND NMAKE_OPTIONS_DBG "WEBP_CFLAGS=${WEBP_INCLUDE_DIRS_DEBUG}" "WEBP_LIBS=${WEBP_LIBS_DEBUG}")
|
60 |
+
|
61 |
+
# libxml2
|
62 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX LIBXML2 MODULES --msvc-syntax libxml-2.0 INCLUDE_DIRS LIBS)
|
63 |
+
list(APPEND NMAKE_OPTIONS_REL "LIBXML2_INC=${LIBXML2_INCLUDE_DIRS_RELEASE}" "LIBXML2_LIB=${LIBXML2_LIBS_RELEASE}")
|
64 |
+
list(APPEND NMAKE_OPTIONS_DBG "LIBXML2_INC=${LIBXML2_INCLUDE_DIRS_DEBUG}" "LIBXML2_LIB=${LIBXML2_LIBS_DEBUG}")
|
65 |
+
|
66 |
+
# openjpeg
|
67 |
+
list(APPEND NMAKE_OPTIONS "OPENJPEG_ENABLED=YES")
|
68 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX OPENJPEG MODULES --msvc-syntax libopenjp2 INCLUDE_DIRS LIBS)
|
69 |
+
list(APPEND NMAKE_OPTIONS_REL "OPENJPEG_CFLAGS=${OPENJPEG_INCLUDE_DIRS_RELEASE}" "OPENJPEG_LIB=${OPENJPEG_LIBS_RELEASE}")
|
70 |
+
list(APPEND NMAKE_OPTIONS_DBG "OPENJPEG_CFLAGS=${OPENJPEG_INCLUDE_DIRS_DEBUG}" "OPENJPEG_LIB=${OPENJPEG_LIBS_DEBUG}")
|
71 |
+
|
72 |
+
# proj
|
73 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX PROJ MODULES --msvc-syntax proj INCLUDE_DIRS LIBS)
|
74 |
+
list(APPEND NMAKE_OPTIONS_REL "PROJ_INCLUDE=${PROJ_INCLUDE_DIRS_RELEASE}" "PROJ_LIBRARY=${PROJ_LIBS_RELEASE}")
|
75 |
+
list(APPEND NMAKE_OPTIONS_DBG "PROJ_INCLUDE=${PROJ_INCLUDE_DIRS_DEBUG}" "PROJ_LIBRARY=${PROJ_LIBS_DEBUG}")
|
76 |
+
|
77 |
+
# sqlite3 and spatialite
|
78 |
+
if ("libspatialite" IN_LIST FEATURES)
|
79 |
+
list(APPEND extra_exports SPATIALITE)
|
80 |
+
list(APPEND NMAKE_OPTIONS "SPATIALITE_412_OR_LATER=yes")
|
81 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX SQLITE MODULES --msvc-syntax spatialite sqlite3 INCLUDE_DIRS LIBS)
|
82 |
+
string(APPEND SQLITE_INCLUDE_DIRS_RELEASE " -DHAVE_SPATIALITE")
|
83 |
+
string(APPEND SQLITE_INCLUDE_DIRS_DEBUG " -DHAVE_SPATIALITE")
|
84 |
+
else()
|
85 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX SQLITE MODULES --msvc-syntax sqlite3 INCLUDE_DIRS LIBS)
|
86 |
+
endif()
|
87 |
+
list(APPEND NMAKE_OPTIONS_REL "SQLITE_INC=${SQLITE_INCLUDE_DIRS_RELEASE}" "SQLITE_LIB=${SQLITE_LIBS_RELEASE}")
|
88 |
+
list(APPEND NMAKE_OPTIONS_DBG "SQLITE_INC=${SQLITE_INCLUDE_DIRS_DEBUG}" "SQLITE_LIB=${SQLITE_LIBS_DEBUG}")
|
89 |
+
|
90 |
+
# tiff
|
91 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX TIFF MODULES --msvc-syntax libtiff-4 INCLUDE_DIRS LIBS)
|
92 |
+
list(APPEND NMAKE_OPTIONS_REL "TIFF_INC=${TIFF_INCLUDE_DIRS_RELEASE} -DBIGTIFF_SUPPORT" "TIFF_LIB=${TIFF_LIBS_RELEASE}")
|
93 |
+
list(APPEND NMAKE_OPTIONS_DBG "TIFF_INC=${TIFF_INCLUDE_DIRS_DEBUG} -DBIGTIFF_SUPPORT" "TIFF_LIB=${TIFF_LIBS_DEBUG}")
|
94 |
+
|
95 |
+
# zlib
|
96 |
+
list(APPEND NMAKE_OPTIONS "ZLIB_EXTERNAL_LIB=1")
|
97 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX ZLIB MODULES --msvc-syntax zlib INCLUDE_DIRS LIBS)
|
98 |
+
list(APPEND NMAKE_OPTIONS_REL "ZLIB_INC=${ZLIB_INCLUDE_DIRS_RELEASE}" "ZLIB_LIB=${ZLIB_LIBS_RELEASE}")
|
99 |
+
list(APPEND NMAKE_OPTIONS_DBG "ZLIB_INC=${ZLIB_INCLUDE_DIRS_DEBUG}" "ZLIB_LIB=${ZLIB_LIBS_DEBUG}")
|
100 |
+
|
101 |
+
# zstd
|
102 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX ZSTD MODULES --msvc-syntax libzstd INCLUDE_DIRS LIBS)
|
103 |
+
list(APPEND NMAKE_OPTIONS_REL "ZSTD_CFLAGS=${ZSTD_INCLUDE_DIRS_RELEASE}" "ZSTD_LIBS=${ZSTD_LIBS_RELEASE}")
|
104 |
+
list(APPEND NMAKE_OPTIONS_DBG "ZSTD_CFLAGS=${ZSTD_INCLUDE_DIRS_DEBUG}" "ZSTD_LIBS=${ZSTD_LIBS_DEBUG}")
|
105 |
+
|
106 |
+
# Features
|
107 |
+
|
108 |
+
if ("cfitsio" IN_LIST FEATURES)
|
109 |
+
list(APPEND NMAKE_OPTIONS "FITS_INC_DIR=${CURRENT_INSTALLED_DIR}/include" "FITS_PLUGIN=NO")
|
110 |
+
list(APPEND NMAKE_OPTIONS_REL "FITS_LIB=${CURRENT_INSTALLED_DIR}/lib/cfitsio.lib")
|
111 |
+
list(APPEND NMAKE_OPTIONS_DBG "FITS_LIB=${CURRENT_INSTALLED_DIR}/debug/lib/cfitsio.lib")
|
112 |
+
endif()
|
113 |
+
|
114 |
+
if("hdf5" IN_LIST FEATURES)
|
115 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" HDF5_DIR)
|
116 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX HDF5 MODULES --msvc-syntax hdf5 LIBS)
|
117 |
+
list(APPEND NMAKE_OPTIONS "HDF5_DIR=${CURRENT_INSTALLED_DIR}" "HDF5_PLUGIN=NO")
|
118 |
+
list(APPEND NMAKE_OPTIONS_REL "HDF5_LIB=${HDF5_LIBS_RELEASE}")
|
119 |
+
list(APPEND NMAKE_OPTIONS_DBG "HDF5_LIB=${HDF5_LIBS_DEBUG}")
|
120 |
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
121 |
+
list(APPEND NMAKE_OPTIONS "HDF5_H5_IS_DLL=YES")
|
122 |
+
endif()
|
123 |
+
endif()
|
124 |
+
|
125 |
+
if("mysql-libmariadb" IN_LIST FEATURES)
|
126 |
+
list(APPEND NMAKE_OPTIONS "MYSQL_INC_DIR=${CURRENT_INSTALLED_DIR}/include/mysql")
|
127 |
+
list(APPEND NMAKE_OPTIONS_REL "MYSQL_LIB=${CURRENT_INSTALLED_DIR}/lib/libmariadb.lib")
|
128 |
+
list(APPEND NMAKE_OPTIONS_DBG "MYSQL_LIB=${CURRENT_INSTALLED_DIR}/debug/lib/libmariadb.lib")
|
129 |
+
endif()
|
130 |
+
|
131 |
+
if("netcdf" IN_LIST FEATURES)
|
132 |
+
list(APPEND NMAKE_OPTIONS "NETCDF_INC_DIR=${CURRENT_INSTALLED_DIR}/include" "NETCDF_SETTING=yes" "NETCDF_PLUGIN=NO")
|
133 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX NETCDF MODULES --msvc-syntax netcdf LIBS)
|
134 |
+
list(APPEND NMAKE_OPTIONS_REL "NETCDF_LIB=${NETCDF_LIBS_RELEASE}")
|
135 |
+
list(APPEND NMAKE_OPTIONS_DBG "NETCDF_LIB=${NETCDF_LIBS_DEBUG}")
|
136 |
+
endif()
|
137 |
+
|
138 |
+
if("poppler" IN_LIST FEATURES)
|
139 |
+
list(APPEND NMAKE_OPTIONS "POPPLER_ENABLED=YES")
|
140 |
+
list(APPEND NMAKE_OPTIONS "POPPLER_MAJOR_VERSION=22" "POPPLER_MINOR_VERSION=1") # Bump as needed
|
141 |
+
list(APPEND NMAKE_OPTIONS "POPPLER_CFLAGS=-I${CURRENT_INSTALLED_DIR}/include -I${CURRENT_INSTALLED_DIR}/include/poppler /std:c++17")
|
142 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX POPPLER MODULES --msvc-syntax poppler LIBS)
|
143 |
+
list(APPEND NMAKE_OPTIONS_REL "POPPLER_LIBS=${POPPLER_LIBS_RELEASE}")
|
144 |
+
list(APPEND NMAKE_OPTIONS_DBG "POPPLER_LIBS=${POPPLER_LIBS_DEBUG}")
|
145 |
+
endif()
|
146 |
+
|
147 |
+
if("postgresql" IN_LIST FEATURES)
|
148 |
+
list(APPEND NMAKE_OPTIONS "PG_INC_DIR=${CURRENT_INSTALLED_DIR}/include")
|
149 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX OPENSSL MODULES --msvc-syntax openssl LIBS)
|
150 |
+
set(PGSQL_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libpq.lib ${CURRENT_INSTALLED_DIR}/lib/libpgcommon.lib ${CURRENT_INSTALLED_DIR}/lib/libpgport.lib")
|
151 |
+
list(APPEND NMAKE_OPTIONS_REL "PG_LIB=${PGSQL_LIBRARY_REL} Secur32.lib Shell32.lib Advapi32.lib Crypt32.lib Gdi32.lib ${OPENSSL_LIBS_RELEASE}")
|
152 |
+
set(PGSQL_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libpq.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libpgcommon.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libpgport.lib")
|
153 |
+
list(APPEND NMAKE_OPTIONS_DBG "PG_LIB=${PGSQL_LIBRARY_DBG} Secur32.lib Shell32.lib Advapi32.lib Crypt32.lib Gdi32.lib ${OPENSSL_LIBS_DEBUG}")
|
154 |
+
endif()
|
155 |
+
|
156 |
+
# Dependencies which are not in vpckg.json
|
157 |
+
|
158 |
+
# cryptopp
|
159 |
+
if("system-libraries" IN_LIST FEATURES AND EXISTS "${CURRENT_INSTALLED_DIR}/lib/cryptopp-static.lib")
|
160 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" CRYPTOPP_INCLUDE)
|
161 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/cryptopp-static.lib" CRYPTOPP_LIBRARY_REL)
|
162 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/cryptopp-static.lib" CRYPTOPP_LIBRARY_DBG)
|
163 |
+
list(APPEND NMAKE_OPTIONS CRYPTOPP_INC=-I${CRYPTOPP_INCLUDE})
|
164 |
+
list(APPEND NMAKE_OPTIONS_REL CRYPTOPP_LIB=${CRYPTOPP_LIBRARY_REL})
|
165 |
+
list(APPEND NMAKE_OPTIONS_DBG CRYPTOPP_LIB=${CRYPTOPP_LIBRARY_DBG})
|
166 |
+
endif()
|
167 |
+
|
168 |
+
# freexl
|
169 |
+
if("system-libraries" IN_LIST FEATURES AND EXISTS "${CURRENT_INSTALLED_DIR}/lib/freexl.lib")
|
170 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" FREEXL_INCLUDE)
|
171 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/freexl.lib" FREEXL_LIBRARY_REL)
|
172 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/freexl.lib" FREEXL_LIBRARY_DBG)
|
173 |
+
list(APPEND NMAKE_OPTIONS FREEXL_CFLAGS=-I${FREEXL_INCLUDE})
|
174 |
+
list(APPEND NMAKE_OPTIONS_REL FREEXL_LIBS=${FREEXL_LIBRARY_REL})
|
175 |
+
list(APPEND NMAKE_OPTIONS_DBG FREEXL_LIBS=${FREEXL_LIBRARY_DBG})
|
176 |
+
endif()
|
177 |
+
|
178 |
+
# libkml
|
179 |
+
if("system-libraries" IN_LIST FEATURES AND EXISTS "${CURRENT_INSTALLED_DIR}/lib/kmlbase.lib")
|
180 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" LIBKML_DIR)
|
181 |
+
list(APPEND NMAKE_OPTIONS LIBKML_DIR=${LIBKML_DIR})
|
182 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" LIBKML_INCLUDE)
|
183 |
+
list(APPEND NMAKE_OPTIONS LIBKML_INCLUDE=-I${LIBKML_INCLUDE})
|
184 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlbase.lib" KMLBASE_REL)
|
185 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlbase.lib" KMLBASE_DBG)
|
186 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlconvenience.lib" KMLCONVENIENCE_REL)
|
187 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlconvenience.lib" KMLCONVENIENCE_DBG)
|
188 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmldom.lib" KMLDOM_REL)
|
189 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmldom.lib" KMLDOM_DBG)
|
190 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlengine.lib" KMLENGINE_REL)
|
191 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlengine.lib" KMLENGINE_DBG)
|
192 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlregionator.lib" KMLREGIONATOR_REL)
|
193 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlregionator.lib" KMLREGIONATOR_DBG)
|
194 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlxsd.lib" KMLXSD_REL)
|
195 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlxsd.lib" KMLXSD_DBG)
|
196 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/bz2.lib" BZIP2_REL)
|
197 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/bz2d.lib" BZIP2_DBG)
|
198 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/minizip.lib" MINIZIP_REL)
|
199 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/minizip.lib" MINIZIP_DBG)
|
200 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/uriparser.lib" URIPARSER_REL)
|
201 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/uriparser.lib" URIPARSER_DBG)
|
202 |
+
list(APPEND NMAKE_OPTIONS_REL "LIBKML_LIBS=${KMLBASE_REL} ${KMLCONVENIENCE_REL} ${KMLDOM_REL} ${KMLENGINE_REL} ${KMLREGIONATOR_REL} ${KMLXSD_REL} ${BZIP2_REL} ${MINIZIP_REL} ${URIPARSER_REL} ${EXPAT_LIBRARY_REL} ${ZLIB_LIBRARY_REL}")
|
203 |
+
list(APPEND NMAKE_OPTIONS_DBG "LIBKML_LIBS=${KMLBASE_DBG} ${KMLCONVENIENCE_DBG} ${KMLDOM_DBG} ${KMLENGINE_DBG} ${KMLREGIONATOR_DBG} ${KMLXSD_DBG} ${BZIP2_DBG} ${MINIZIP_DBG} ${URIPARSER_DBG} ${EXPAT_LIBRARY_DBG} ${ZLIB_LIBRARY_DBG}")
|
204 |
+
endif()
|
205 |
+
|
206 |
+
# xerces-c
|
207 |
+
if("system-libraries" IN_LIST FEATURES AND EXISTS "${CURRENT_INSTALLED_DIR}/lib/xerces-c_3.lib")
|
208 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" XERCES_DIR)
|
209 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" XERCES_INCLUDE)
|
210 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/xerces-c_3.lib" XERCES_LIBRARY_REL)
|
211 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/xerces-c_3D.lib" XERCES_LIBRARY_DBG)
|
212 |
+
list(APPEND NMAKE_OPTIONS ILI_ENABLED=YES)
|
213 |
+
list(APPEND NMAKE_OPTIONS XERCES_DIR=${XERCES_DIR})
|
214 |
+
list(APPEND NMAKE_OPTIONS "XERCES_INCLUDE=-I${XERCES_INCLUDE} -I${XERCES_INCLUDE}/xercesc")
|
215 |
+
list(APPEND NMAKE_OPTIONS_REL XERCES_LIB=${XERCES_LIBRARY_REL})
|
216 |
+
list(APPEND NMAKE_OPTIONS_DBG XERCES_LIB=${XERCES_LIBRARY_DBG})
|
217 |
+
endif()
|
218 |
+
|
219 |
+
endmacro()
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdal/portfile.cmake
ADDED
@@ -0,0 +1,376 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
set(GDAL_PATCHES
|
2 |
+
0001-Fix-debug-crt-flags.patch
|
3 |
+
0002-Fix-build.patch
|
4 |
+
0004-Fix-cfitsio.patch
|
5 |
+
0005-Fix-configure.patch
|
6 |
+
0007-Control-tools.patch
|
7 |
+
0008-Fix-absl-string_view.patch
|
8 |
+
0009-atlbase.patch
|
9 |
+
0010-symprefix.patch
|
10 |
+
)
|
11 |
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
12 |
+
list(APPEND GDAL_PATCHES 0006-Fix-mingw-dllexport.patch)
|
13 |
+
endif()
|
14 |
+
|
15 |
+
vcpkg_from_github(
|
16 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
17 |
+
REPO OSGeo/gdal
|
18 |
+
REF v3.4.2
|
19 |
+
SHA512 4dadfaefb4924e17395b2d8b695e185e91e9ad28b4b8666b64f11f40164411974f8ade747592060b515907ee73bf335610698c5e53e56a8937a89ddfffc3d66b
|
20 |
+
HEAD_REF master
|
21 |
+
PATCHES ${GDAL_PATCHES}
|
22 |
+
)
|
23 |
+
# `vcpkg clean` stumbles over one subdir
|
24 |
+
file(REMOVE_RECURSE "${SOURCE_PATH}/autotest")
|
25 |
+
|
26 |
+
set(extra_exports "")
|
27 |
+
if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
28 |
+
if (VCPKG_CRT_LINKAGE STREQUAL "static")
|
29 |
+
set(LINKAGE_FLAGS "/MT")
|
30 |
+
else()
|
31 |
+
set(LINKAGE_FLAGS "/MD")
|
32 |
+
endif()
|
33 |
+
|
34 |
+
set(NMAKE_OPTIONS
|
35 |
+
"DATADIR=${CURRENT_PACKAGES_DIR}/share/gdal"
|
36 |
+
"HTMLDIR=${CURRENT_PACKAGES_DIR}/share/gdal/html"
|
37 |
+
"MSVC_VER=1900"
|
38 |
+
)
|
39 |
+
set(NMAKE_OPTIONS_REL
|
40 |
+
"GDAL_HOME=${CURRENT_PACKAGES_DIR}"
|
41 |
+
"CXX_CRT_FLAGS=${LINKAGE_FLAGS}"
|
42 |
+
)
|
43 |
+
set(NMAKE_OPTIONS_DBG
|
44 |
+
"GDAL_HOME=${CURRENT_PACKAGES_DIR}/debug"
|
45 |
+
"CXX_CRT_FLAGS=${LINKAGE_FLAGS}d"
|
46 |
+
DEBUG=1
|
47 |
+
)
|
48 |
+
|
49 |
+
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
50 |
+
list(APPEND NMAKE_OPTIONS "WIN64=YES")
|
51 |
+
endif()
|
52 |
+
|
53 |
+
if(VCPKG_TARGET_IS_UWP)
|
54 |
+
list(APPEND NMAKE_OPTIONS "SYM_PREFIX=" "EXTRA_LINKER_FLAGS=/APPCONTAINER WindowsApp.lib")
|
55 |
+
endif()
|
56 |
+
|
57 |
+
if(VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
58 |
+
list(APPEND NMAKE_OPTIONS "HAVE_ATLBASE_H=NO")
|
59 |
+
endif()
|
60 |
+
|
61 |
+
if(VCPKG_TARGET_ARCHITECTURE MATCHES "^arm")
|
62 |
+
list(APPEND NMAKE_OPTIONS "SSEFLAGS=/DNO_SSSE" "AVXFLAGS=/DNO_AVX")
|
63 |
+
endif()
|
64 |
+
|
65 |
+
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
66 |
+
list(APPEND NMAKE_OPTIONS "DLLBUILD=0")
|
67 |
+
else()
|
68 |
+
list(APPEND NMAKE_OPTIONS "DLLBUILD=1" "WITH_PDB=1")
|
69 |
+
endif()
|
70 |
+
|
71 |
+
include("${CMAKE_CURRENT_LIST_DIR}/dependency_win.cmake")
|
72 |
+
find_dependency_win()
|
73 |
+
|
74 |
+
if("tools" IN_LIST FEATURES)
|
75 |
+
list(APPEND NMAKE_OPTIONS_REL "BUILD_TOOLS=1")
|
76 |
+
else()
|
77 |
+
list(APPEND NMAKE_OPTIONS_REL "BUILD_TOOLS=0")
|
78 |
+
endif()
|
79 |
+
list(APPEND NMAKE_OPTIONS_DBG "BUILD_TOOLS=0")
|
80 |
+
|
81 |
+
# Begin build process
|
82 |
+
vcpkg_install_nmake(
|
83 |
+
SOURCE_PATH "${SOURCE_PATH}/gdal"
|
84 |
+
TARGET devinstall
|
85 |
+
OPTIONS
|
86 |
+
${NMAKE_OPTIONS}
|
87 |
+
OPTIONS_RELEASE
|
88 |
+
${NMAKE_OPTIONS_REL}
|
89 |
+
OPTIONS_DEBUG
|
90 |
+
${NMAKE_OPTIONS_DBG}
|
91 |
+
)
|
92 |
+
|
93 |
+
if("tools" IN_LIST FEATURES)
|
94 |
+
set(GDAL_EXES
|
95 |
+
gdal_contour
|
96 |
+
gdal_create
|
97 |
+
gdal_grid
|
98 |
+
gdal_rasterize
|
99 |
+
gdal_translate
|
100 |
+
gdal_viewshed
|
101 |
+
gdaladdo
|
102 |
+
gdalbuildvrt
|
103 |
+
gdaldem
|
104 |
+
gdalenhance
|
105 |
+
gdalinfo
|
106 |
+
gdallocationinfo
|
107 |
+
gdalmanage
|
108 |
+
gdalmdiminfo
|
109 |
+
gdalmdimtranslate
|
110 |
+
gdalsrsinfo
|
111 |
+
gdaltindex
|
112 |
+
gdaltransform
|
113 |
+
gdalwarp
|
114 |
+
gnmanalyse
|
115 |
+
gnmmanage
|
116 |
+
nearblack
|
117 |
+
ogr2ogr
|
118 |
+
ogrinfo
|
119 |
+
ogrlineref
|
120 |
+
ogrtindex
|
121 |
+
)
|
122 |
+
# vcpkg_copy_tools removes the bin directories for us so no need to remove again
|
123 |
+
vcpkg_copy_tools(TOOL_NAMES ${GDAL_EXES} AUTO_CLEAN)
|
124 |
+
elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
125 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
126 |
+
endif()
|
127 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/share/gdal/html")
|
128 |
+
|
129 |
+
vcpkg_copy_pdbs()
|
130 |
+
|
131 |
+
if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
132 |
+
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/gdal204.pdb")
|
133 |
+
endif()
|
134 |
+
|
135 |
+
else()
|
136 |
+
# See https://github.com/microsoft/vcpkg/issues/16990
|
137 |
+
file(TOUCH "${SOURCE_PATH}/gdal/config.rpath")
|
138 |
+
|
139 |
+
set(CONF_OPTS
|
140 |
+
--with-gnm=yes
|
141 |
+
--with-hide-internal-symbols=yes
|
142 |
+
--with-java=no
|
143 |
+
--with-perl=no
|
144 |
+
--with-python=no
|
145 |
+
)
|
146 |
+
set(CONF_CHECKS "")
|
147 |
+
function(add_config option check)
|
148 |
+
list(APPEND CONF_OPTS "${option}")
|
149 |
+
set(CONF_OPTS "${CONF_OPTS}" PARENT_SCOPE)
|
150 |
+
list(APPEND CONF_CHECKS "${check}")
|
151 |
+
set(CONF_CHECKS "${CONF_CHECKS}" PARENT_SCOPE)
|
152 |
+
endfunction()
|
153 |
+
# parameters in the same order as the dependencies in vcpkg.json
|
154 |
+
add_config("--with-curl=yes" "cURL support .wms/wcs/....:yes")
|
155 |
+
add_config("--with-expat=yes" "Expat support: yes")
|
156 |
+
add_config("--with-geos=yes" "GEOS support: yes")
|
157 |
+
add_config("--with-gif=yes" "LIBGIF support: external")
|
158 |
+
add_config("--with-libjson=yes" "checking for JSONC... yes")
|
159 |
+
add_config("--with-geotiff=yes" "LIBGEOTIFF support: external")
|
160 |
+
add_config("--with-jpeg=yes" "LIBJPEG support: external")
|
161 |
+
add_config("--with-liblzma=yes" "LIBLZMA support: yes")
|
162 |
+
add_config("--with-png=yes" "LIBPNG support: external")
|
163 |
+
add_config("--with-webp=yes" "WebP support: yes")
|
164 |
+
add_config("--with-xml2=yes" "libxml2 support: yes")
|
165 |
+
add_config("--with-openjpeg=yes" "OpenJPEG support: yes")
|
166 |
+
add_config("--with-proj=yes" "PROJ >= 6: yes")
|
167 |
+
add_config("--with-sqlite3=yes" "SQLite support: yes")
|
168 |
+
add_config("--with-libtiff=yes" "LIBTIFF support: external")
|
169 |
+
add_config("--with-libz=yes" "LIBZ support: external")
|
170 |
+
add_config("--with-zstd=yes" "ZSTD support: yes")
|
171 |
+
|
172 |
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
173 |
+
list(APPEND CONF_OPTS --without-libtool --without-ld-shared)
|
174 |
+
endif()
|
175 |
+
|
176 |
+
if("system-libraries" IN_LIST FEATURES)
|
177 |
+
set(DISABLE_SYSTEM_LIBRARIES OFF)
|
178 |
+
else()
|
179 |
+
set(DISABLE_SYSTEM_LIBRARIES ON)
|
180 |
+
endif()
|
181 |
+
|
182 |
+
if ("libspatialite" IN_LIST FEATURES)
|
183 |
+
add_config("--with-spatialite=yes" "SpatiaLite support: yes")
|
184 |
+
elseif(DISABLE_SYSTEM_LIBRARIES)
|
185 |
+
add_config("--with-spatialite=no" "SpatiaLite support: no")
|
186 |
+
endif()
|
187 |
+
|
188 |
+
if ("poppler" IN_LIST FEATURES)
|
189 |
+
add_config("--with-poppler=yes" "Poppler support: yes")
|
190 |
+
elseif(DISABLE_SYSTEM_LIBRARIES)
|
191 |
+
add_config("--with-poppler=no" "Poppler support: no")
|
192 |
+
endif()
|
193 |
+
if ("postgresql" IN_LIST FEATURES)
|
194 |
+
add_config("--with-pg=yes" "PostgreSQL support: yes")
|
195 |
+
elseif(DISABLE_SYSTEM_LIBRARIES)
|
196 |
+
add_config("--with-pg=no" "PostgreSQL support: no")
|
197 |
+
endif()
|
198 |
+
|
199 |
+
if ("mysql-libmariadb" IN_LIST FEATURES)
|
200 |
+
add_config("--with-mysql=yes" "MySQL support: yes")
|
201 |
+
elseif(DISABLE_SYSTEM_LIBRARIES)
|
202 |
+
add_config("--with-mysql=no" "MySQL support: no")
|
203 |
+
endif()
|
204 |
+
|
205 |
+
if ("cfitsio" IN_LIST FEATURES)
|
206 |
+
add_config("--with-cfitsio=yes" "CFITSIO support: external")
|
207 |
+
elseif(DISABLE_SYSTEM_LIBRARIES)
|
208 |
+
add_config("--with-cfitsio=no" "CFITSIO support: no")
|
209 |
+
endif()
|
210 |
+
|
211 |
+
if ("hdf5" IN_LIST FEATURES)
|
212 |
+
add_config("--with-hdf5=yes" "HDF5 support: yes")
|
213 |
+
elseif(DISABLE_SYSTEM_LIBRARIES)
|
214 |
+
add_config("--with-hdf5=no" "HDF5 support: no")
|
215 |
+
endif()
|
216 |
+
|
217 |
+
if ("netcdf" IN_LIST FEATURES)
|
218 |
+
add_config("--with-netcdf=yes" "NetCDF support: yes")
|
219 |
+
elseif(DISABLE_SYSTEM_LIBRARIES)
|
220 |
+
add_config("--with-netcdf=no" "NetCDF support: no")
|
221 |
+
endif()
|
222 |
+
|
223 |
+
if(DISABLE_SYSTEM_LIBRARIES)
|
224 |
+
list(APPEND CONF_OPTS
|
225 |
+
# Too much: --disable-all-optional-drivers
|
226 |
+
# alphabetical order
|
227 |
+
--with-armadillo=no
|
228 |
+
--with-blosc=no
|
229 |
+
--with-brunsli=no
|
230 |
+
--with-charls=no
|
231 |
+
--with-crypto=no
|
232 |
+
--with-cryptopp=no
|
233 |
+
--with-dds=no
|
234 |
+
--with-dods-root=no
|
235 |
+
--with-ecw=no
|
236 |
+
--with-epsilon=no
|
237 |
+
--with-exr=no
|
238 |
+
--with-fgdb=no
|
239 |
+
--with-fme=no
|
240 |
+
--with-freexl=no
|
241 |
+
--with-grass=no
|
242 |
+
--with-gta=no
|
243 |
+
--with-hdf4=no
|
244 |
+
--with-hdfs=no
|
245 |
+
--with-heif=no
|
246 |
+
--with-idb=no
|
247 |
+
--with-ingres=no
|
248 |
+
--with-jp2lura=no
|
249 |
+
--with-jp2mrsid=no
|
250 |
+
--with-jasper=no
|
251 |
+
--with-jxl=no
|
252 |
+
--with-kakadu=no
|
253 |
+
--with-kea=no
|
254 |
+
--with-lerc=no
|
255 |
+
--with-libdeflate=no
|
256 |
+
--with-libgrass=no
|
257 |
+
--with-libkml=no
|
258 |
+
--with-lz4=no
|
259 |
+
--with-mdb=no
|
260 |
+
--with-mongocxx=no
|
261 |
+
--with-mongocxxv3=no
|
262 |
+
--with-mrsid=no
|
263 |
+
--with-mrsid_lidar=no
|
264 |
+
--with-msg=no
|
265 |
+
--with-null=no
|
266 |
+
--with-oci=no
|
267 |
+
--with-odbc=no
|
268 |
+
--with-ogdi=no
|
269 |
+
--with-opencl=no
|
270 |
+
--with-pcidsk=no
|
271 |
+
--with-pcraster=no
|
272 |
+
--with-pcre=no
|
273 |
+
--with-pcre2=no
|
274 |
+
--with-pdfium=no
|
275 |
+
--with-podofo=no
|
276 |
+
--with-qhull=no
|
277 |
+
--with-rasdaman=no
|
278 |
+
--with-rasterlite2=no
|
279 |
+
--with-rdb=no
|
280 |
+
--with-sfcgal=no
|
281 |
+
--with-sosi=no
|
282 |
+
--with-teigha=no
|
283 |
+
--with-tiledb=no
|
284 |
+
--with-xerces=no
|
285 |
+
)
|
286 |
+
endif()
|
287 |
+
|
288 |
+
x_vcpkg_pkgconfig_get_modules(PREFIX PROJ MODULES proj LIBS)
|
289 |
+
|
290 |
+
if("tools" IN_LIST FEATURES)
|
291 |
+
list(APPEND CONF_OPTS "--with-tools=yes")
|
292 |
+
else()
|
293 |
+
list(APPEND CONF_OPTS "--with-tools=no")
|
294 |
+
endif()
|
295 |
+
|
296 |
+
vcpkg_configure_make(
|
297 |
+
SOURCE_PATH "${SOURCE_PATH}/gdal"
|
298 |
+
AUTOCONFIG
|
299 |
+
COPY_SOURCE
|
300 |
+
OPTIONS
|
301 |
+
${CONF_OPTS}
|
302 |
+
OPTIONS_RELEASE
|
303 |
+
"--with-proj-extra-lib-for-test=${PROJ_LIBS_RELEASE}"
|
304 |
+
OPTIONS_DEBUG
|
305 |
+
--enable-debug
|
306 |
+
--with-tools=no
|
307 |
+
"--with-proj-extra-lib-for-test=${PROJ_LIBS_DEBUG}"
|
308 |
+
)
|
309 |
+
|
310 |
+
# Verify configuration results (tightly coupled to vcpkg_configure_make)
|
311 |
+
function(check_config logfile)
|
312 |
+
set(failed_checks "")
|
313 |
+
file(READ "${logfile}" log)
|
314 |
+
foreach(check IN LISTS CONF_CHECKS)
|
315 |
+
if(NOT log MATCHES "${check}")
|
316 |
+
string(APPEND failed_checks "\n ${check}")
|
317 |
+
endif()
|
318 |
+
endforeach()
|
319 |
+
if(failed_checks)
|
320 |
+
get_filename_component(file "${logfile}" NAME_WE)
|
321 |
+
message(FATAL_ERROR "${file}: Configuration failed for ${failed_checks}")
|
322 |
+
endif()
|
323 |
+
endfunction()
|
324 |
+
foreach(suffix IN ITEMS rel dbg)
|
325 |
+
set(log "${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-${suffix}-out.log")
|
326 |
+
if(EXISTS "${log}")
|
327 |
+
check_config("${log}")
|
328 |
+
endif()
|
329 |
+
endforeach()
|
330 |
+
|
331 |
+
vcpkg_install_make(MAKEFILE GNUmakefile)
|
332 |
+
|
333 |
+
file(REMOVE_RECURSE
|
334 |
+
"${CURRENT_PACKAGES_DIR}/lib/gdalplugins"
|
335 |
+
"${CURRENT_PACKAGES_DIR}/debug/lib/gdalplugins"
|
336 |
+
"${CURRENT_PACKAGES_DIR}/debug/share"
|
337 |
+
)
|
338 |
+
|
339 |
+
vcpkg_fixup_pkgconfig()
|
340 |
+
set(pc_file_debug "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gdal.pc")
|
341 |
+
if(EXISTS "${pc_file_debug}")
|
342 |
+
vcpkg_replace_string("${pc_file_debug}" "\${prefix}/../../include" "\${prefix}/../include")
|
343 |
+
vcpkg_replace_string("${pc_file_debug}" "\${exec_prefix}/include" "\${prefix}/../include")
|
344 |
+
endif()
|
345 |
+
|
346 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/gdal/bin/gdal-config" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../..")
|
347 |
+
if(NOT VCPKG_BUILD_TYPE)
|
348 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/gdal/debug/bin/gdal-config" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../../..")
|
349 |
+
endif()
|
350 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/cpl_config.h" "#define GDAL_PREFIX \"${CURRENT_INSTALLED_DIR}\"" "")
|
351 |
+
|
352 |
+
if("libspatialite" IN_LIST FEATURES)
|
353 |
+
list(APPEND extra_exports SPATIALITE)
|
354 |
+
x_vcpkg_pkgconfig_get_modules(
|
355 |
+
PREFIX SPATIALITE
|
356 |
+
MODULES spatialite
|
357 |
+
LIBS
|
358 |
+
)
|
359 |
+
endif()
|
360 |
+
endif()
|
361 |
+
|
362 |
+
string(COMPARE NOTEQUAL "${NMAKE_OPTIONS}" "" NMAKE_BUILD)
|
363 |
+
set(GDAL_EXTRA_LIBS_DEBUG "")
|
364 |
+
set(GDAL_EXTRA_LIBS_RELEASE "")
|
365 |
+
foreach(prefix IN LISTS extra_exports)
|
366 |
+
string(REPLACE "${CURRENT_INSTALLED_DIR}/" "\${CMAKE_CURRENT_LIST_DIR}/../../" libs "${${prefix}_LIBS_DEBUG}")
|
367 |
+
string(APPEND GDAL_EXTRA_LIBS_DEBUG " ${libs}")
|
368 |
+
string(REPLACE "${CURRENT_INSTALLED_DIR}/" "\${CMAKE_CURRENT_LIST_DIR}/../../" libs "${${prefix}_LIBS_RELEASE}")
|
369 |
+
string(APPEND GDAL_EXTRA_LIBS_RELEASE " ${libs}")
|
370 |
+
endforeach()
|
371 |
+
string(REPLACE "/lib/pkgconfig/../.." "" GDAL_EXTRA_LIBS_DEBUG "${GDAL_EXTRA_LIBS_DEBUG}")
|
372 |
+
string(REPLACE "/lib/pkgconfig/../.." "" GDAL_EXTRA_LIBS_RELEASE "${GDAL_EXTRA_LIBS_RELEASE}")
|
373 |
+
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
|
374 |
+
|
375 |
+
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
376 |
+
file(INSTALL "${SOURCE_PATH}/gdal/LICENSE.TXT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdal/usage
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The package GDAL provides CMake targets:
|
2 |
+
|
3 |
+
find_package(GDAL REQUIRED)
|
4 |
+
target_include_directories(main PRIVATE ${GDAL_INCLUDE_DIRS})
|
5 |
+
target_link_libraries(main PRIVATE ${GDAL_LIBRARIES})
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdal/vcpkg-cmake-wrapper.cmake
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
include(SelectLibraryConfigurations)
|
2 |
+
|
3 |
+
find_path(GDAL_INCLUDE_DIR
|
4 |
+
NAMES gdal.h
|
5 |
+
PATHS "${CMAKE_CURRENT_LIST_DIR}/../../include"
|
6 |
+
NO_DEFAULT_PATH
|
7 |
+
)
|
8 |
+
find_library(GDAL_LIBRARY_DEBUG
|
9 |
+
NAMES gdal_d gdal_i_d gdal
|
10 |
+
NAMES_PER_DIR
|
11 |
+
PATHS "${CMAKE_CURRENT_LIST_DIR}/../../debug/lib"
|
12 |
+
NO_DEFAULT_PATH
|
13 |
+
)
|
14 |
+
find_library(GDAL_LIBRARY_RELEASE
|
15 |
+
NAMES gdal_i gdal
|
16 |
+
NAMES_PER_DIR
|
17 |
+
PATHS "${CMAKE_CURRENT_LIST_DIR}/../../lib"
|
18 |
+
NO_DEFAULT_PATH
|
19 |
+
)
|
20 |
+
select_library_configurations(GDAL)
|
21 |
+
|
22 |
+
if(NOT GDAL_INCLUDE_DIR OR NOT GDAL_LIBRARY)
|
23 |
+
message(FATAL_ERROR "Installation of vcpkg port gdal is broken.")
|
24 |
+
endif()
|
25 |
+
|
26 |
+
set(GDAL_LIBRARY "${GDAL_LIBRARY}" CACHE STRING "")
|
27 |
+
|
28 |
+
set(FindGDAL_SKIP_GDAL_CONFIG TRUE)
|
29 |
+
|
30 |
+
_find_package(${ARGS})
|
31 |
+
|
32 |
+
set(_gdal_dep_find_args "")
|
33 |
+
if(";${ARGS};" MATCHES ";REQUIRED;")
|
34 |
+
list(APPEND _gdal_dep_find_args "REQUIRED")
|
35 |
+
endif()
|
36 |
+
function(_gdal_add_dependency target package)
|
37 |
+
find_package(${package} ${ARGN} ${_gdal_dep_find_args})
|
38 |
+
if(${package}_FOUND)
|
39 |
+
foreach(suffix IN ITEMS "" "-shared" "_shared" "-static" "_static" "-NOTFOUND")
|
40 |
+
set(dependency "${target}${suffix}")
|
41 |
+
if(TARGET ${dependency})
|
42 |
+
break()
|
43 |
+
endif()
|
44 |
+
endforeach()
|
45 |
+
if(NOT TARGET ${dependency})
|
46 |
+
string(TOUPPER ${package} _gdal_deps_package)
|
47 |
+
if(DEFINED ${_gdal_deps_package}_LIBRARIES)
|
48 |
+
set(dependency ${${_gdal_deps_package}_LIBRARIES})
|
49 |
+
elseif(DEFINED ${package}_LIBRARIES)
|
50 |
+
set(dependency ${${package}_LIBRARIES})
|
51 |
+
elseif(DEFINED ${_gdal_deps_package}_LIBRARY)
|
52 |
+
set(dependency ${${_gdal_deps_package}_LIBRARY})
|
53 |
+
elseif(DEFINED ${package}_LIBRARY)
|
54 |
+
set(dependency ${${package}_LIBRARY})
|
55 |
+
endif()
|
56 |
+
endif()
|
57 |
+
if(dependency)
|
58 |
+
if(TARGET GDAL::GDAL) # CMake 3.14
|
59 |
+
set_property(TARGET GDAL::GDAL APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${dependency})
|
60 |
+
endif()
|
61 |
+
if(NOT GDAL_LIBRARIES STREQUAL "GDAL::GDAL")
|
62 |
+
set(GDAL_LIBRARIES "${GDAL_LIBRARIES};${dependency}" PARENT_SCOPE)
|
63 |
+
endif()
|
64 |
+
else()
|
65 |
+
message(WARNING "Did not find which libraries are exported by ${package}")
|
66 |
+
set(GDAL_FOUND false PARENT_SCOPE)
|
67 |
+
endif()
|
68 |
+
else()
|
69 |
+
message(WARNING "Could not find package ${package}")
|
70 |
+
set(GDAL_FOUND false PARENT_SCOPE)
|
71 |
+
endif()
|
72 |
+
endfunction()
|
73 |
+
function(z_vcpkg_gdal_add_libs keyword config)
|
74 |
+
set(gdal_deps_target "unofficial::gdal::deps::${keyword}")
|
75 |
+
if(NOT TARGET "${gdal_deps_target}")
|
76 |
+
add_library("${gdal_deps_target}" INTERFACE IMPORTED)
|
77 |
+
if(TARGET GDAL::GDAL) # CMake 3.14
|
78 |
+
set_property(TARGET GDAL::GDAL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "$<$<CONFIG:${config}>:${gdal_deps_target}>")
|
79 |
+
endif()
|
80 |
+
if(NOT GDAL_LIBRARIES STREQUAL "GDAL::GDAL")
|
81 |
+
set(GDAL_LIBRARIES "${GDAL_LIBRARIES};${keyword};${gdal_deps_target}" PARENT_SCOPE)
|
82 |
+
endif()
|
83 |
+
endif()
|
84 |
+
# The Ninja build system stumbles over '/libpath:` in INTERFACE_LINK_LIBRARIES.
|
85 |
+
set(lib_paths "${ARGN}")
|
86 |
+
list(REMOVE_DUPLICATES lib_paths) # For lib paths, late duplicates are redundant.
|
87 |
+
foreach(item IN LISTS lib_paths)
|
88 |
+
# INTERFACE_LINK_OPTIONS needs CMake 3.13. There is no direct alternative for older versions.
|
89 |
+
if(item MATCHES "^/libpath:(.*)|^-L")
|
90 |
+
set_property(TARGET "${gdal_deps_target}" APPEND PROPERTY INTERFACE_LINK_OPTIONS "${item}")
|
91 |
+
list(REMOVE_ITEM ARGN "${item}")
|
92 |
+
endif()
|
93 |
+
endforeach()
|
94 |
+
foreach(item IN LISTS ARGN)
|
95 |
+
get_property(libs TARGET "${gdal_deps_target}" PROPERTY INTERFACE_LINK_LIBRARIES)
|
96 |
+
if(item MATCHES "^-l|-pthread")
|
97 |
+
list(REMOVE_ITEM libs "${item}") # For libs, early duplicates are normally redundant.
|
98 |
+
endif()
|
99 |
+
list(APPEND libs "${item}")
|
100 |
+
set_property(TARGET "${gdal_deps_target}" PROPERTY INTERFACE_LINK_LIBRARIES "${libs}")
|
101 |
+
endforeach()
|
102 |
+
endfunction()
|
103 |
+
if(GDAL_FOUND)
|
104 |
+
cmake_policy(PUSH)
|
105 |
+
cmake_policy(SET CMP0057 NEW)
|
106 |
+
set(Z_VCPKG_PORT_FEATURES "@FEATURES@")
|
107 |
+
if("cfitsio" IN_LIST Z_VCPKG_PORT_FEATURES)
|
108 |
+
_gdal_add_dependency(cfitsio unofficial-cfitsio CONFIG)
|
109 |
+
endif()
|
110 |
+
_gdal_add_dependency(CURL::libcurl CURL CONFIG)
|
111 |
+
_gdal_add_dependency(expat::expat expat CONFIG)
|
112 |
+
_gdal_add_dependency(GEOS::geos_c geos CONFIG)
|
113 |
+
if(NOT "@NMAKE_BUILD@")
|
114 |
+
_gdal_add_dependency(GIF::GIF GIF)
|
115 |
+
endif()
|
116 |
+
if("hdf5" IN_LIST Z_VCPKG_PORT_FEATURES)
|
117 |
+
_gdal_add_dependency(hdf5::hdf5 hdf5 CONFIG)
|
118 |
+
endif()
|
119 |
+
if(NOT "@NMAKE_BUILD@")
|
120 |
+
_gdal_add_dependency(json-c::json-c json-c CONFIG)
|
121 |
+
endif()
|
122 |
+
_gdal_add_dependency(geotiff_library GeoTIFF CONFIG)
|
123 |
+
_gdal_add_dependency(JPEG::JPEG JPEG)
|
124 |
+
_gdal_add_dependency(LibLZMA::LibLZMA LibLZMA)
|
125 |
+
_gdal_add_dependency(png libpng CONFIG)
|
126 |
+
if("poppler" IN_LIST Z_VCPKG_PORT_FEATURES)
|
127 |
+
_gdal_add_dependency(unofficial::poppler::poppler-private unofficial-poppler)
|
128 |
+
endif()
|
129 |
+
if("postgresql" IN_LIST Z_VCPKG_PORT_FEATURES)
|
130 |
+
_gdal_add_dependency(PostgreSQL::PostgreSQL PostgreSQL)
|
131 |
+
endif()
|
132 |
+
_gdal_add_dependency(WebP::webp WebP CONFIG)
|
133 |
+
_gdal_add_dependency(LibXml2::LibXml2 LibXml2)
|
134 |
+
if("netcdf" IN_LIST Z_VCPKG_PORT_FEATURES)
|
135 |
+
_gdal_add_dependency(netCDF::netcdf netCDF CONFIG)
|
136 |
+
endif()
|
137 |
+
_gdal_add_dependency(openjp2 OpenJPEG CONFIG)
|
138 |
+
_gdal_add_dependency(PROJ::proj PROJ4 CONFIG)
|
139 |
+
_gdal_add_dependency(unofficial::sqlite3::sqlite3 unofficial-sqlite3 CONFIG)
|
140 |
+
_gdal_add_dependency(TIFF::TIFF TIFF)
|
141 |
+
_gdal_add_dependency(ZLIB::ZLIB ZLIB)
|
142 |
+
_gdal_add_dependency(zstd::libzstd zstd CONFIG)
|
143 |
+
z_vcpkg_gdal_add_libs(optimized Release @GDAL_EXTRA_LIBS_RELEASE@)
|
144 |
+
z_vcpkg_gdal_add_libs(debug Debug @GDAL_EXTRA_LIBS_DEBUG@)
|
145 |
+
list(FIND ARGS "REQUIRED" required)
|
146 |
+
if(NOT GDAL_FOUND AND NOT required EQUAL "-1")
|
147 |
+
message(FATAL_ERROR "Failed to find dependencies of GDAL")
|
148 |
+
endif()
|
149 |
+
unset(Z_VCPKG_PORT_FEATURES)
|
150 |
+
cmake_policy(POP)
|
151 |
+
endif()
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdal/vcpkg.json
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "gdal",
|
3 |
+
"version-semver": "3.4.2",
|
4 |
+
"description": "The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data",
|
5 |
+
"homepage": "https://gdal.org",
|
6 |
+
"license": null,
|
7 |
+
"dependencies": [
|
8 |
+
{
|
9 |
+
"name": "atlmfc",
|
10 |
+
"platform": "windows & !uwp"
|
11 |
+
},
|
12 |
+
"curl",
|
13 |
+
"expat",
|
14 |
+
"geos",
|
15 |
+
{
|
16 |
+
"name": "giflib",
|
17 |
+
"platform": "!windows | mingw"
|
18 |
+
},
|
19 |
+
{
|
20 |
+
"name": "json-c",
|
21 |
+
"platform": "!windows | mingw"
|
22 |
+
},
|
23 |
+
"libgeotiff",
|
24 |
+
{
|
25 |
+
"name": "libiconv",
|
26 |
+
"platform": "windows & !mingw"
|
27 |
+
},
|
28 |
+
"libjpeg-turbo",
|
29 |
+
"liblzma",
|
30 |
+
"libpng",
|
31 |
+
"libwebp",
|
32 |
+
"libxml2",
|
33 |
+
"openjpeg",
|
34 |
+
"proj",
|
35 |
+
"sqlite3",
|
36 |
+
"tiff",
|
37 |
+
{
|
38 |
+
"name": "vcpkg-pkgconfig-get-modules",
|
39 |
+
"host": true
|
40 |
+
},
|
41 |
+
"zlib",
|
42 |
+
"zstd"
|
43 |
+
],
|
44 |
+
"default-features": [
|
45 |
+
"supported-default-features"
|
46 |
+
],
|
47 |
+
"features": {
|
48 |
+
"cfitsio": {
|
49 |
+
"description": "Enable cfitsio support",
|
50 |
+
"dependencies": [
|
51 |
+
"cfitsio"
|
52 |
+
]
|
53 |
+
},
|
54 |
+
"hdf5": {
|
55 |
+
"description": "Enable HDF5 support",
|
56 |
+
"dependencies": [
|
57 |
+
"hdf5"
|
58 |
+
]
|
59 |
+
},
|
60 |
+
"libspatialite": {
|
61 |
+
"description": "Create or update SpatiaLite databases using libspatialite",
|
62 |
+
"dependencies": [
|
63 |
+
"libspatialite"
|
64 |
+
]
|
65 |
+
},
|
66 |
+
"mysql-libmariadb": {
|
67 |
+
"description": "Add mysql support using libmariadb",
|
68 |
+
"dependencies": [
|
69 |
+
"libmariadb"
|
70 |
+
]
|
71 |
+
},
|
72 |
+
"netcdf": {
|
73 |
+
"description": "Enable NetCDF support",
|
74 |
+
"dependencies": [
|
75 |
+
"netcdf-c"
|
76 |
+
]
|
77 |
+
},
|
78 |
+
"poppler": {
|
79 |
+
"description": "Enable poppler support",
|
80 |
+
"dependencies": [
|
81 |
+
{
|
82 |
+
"name": "poppler",
|
83 |
+
"default-features": false,
|
84 |
+
"features": [
|
85 |
+
"private-api"
|
86 |
+
]
|
87 |
+
}
|
88 |
+
]
|
89 |
+
},
|
90 |
+
"postgresql": {
|
91 |
+
"description": "Enable PostgreSQL support",
|
92 |
+
"dependencies": [
|
93 |
+
"libpq"
|
94 |
+
]
|
95 |
+
},
|
96 |
+
"supported-default-features": {
|
97 |
+
"description": "Default set of features, dependent on platform",
|
98 |
+
"dependencies": [
|
99 |
+
{
|
100 |
+
"name": "gdal",
|
101 |
+
"default-features": false,
|
102 |
+
"features": [
|
103 |
+
"postgresql"
|
104 |
+
],
|
105 |
+
"platform": "!uwp"
|
106 |
+
},
|
107 |
+
{
|
108 |
+
"name": "gdal",
|
109 |
+
"default-features": false,
|
110 |
+
"features": [
|
111 |
+
"hdf5",
|
112 |
+
"netcdf"
|
113 |
+
],
|
114 |
+
"platform": "!uwp & !(windows & arm64)"
|
115 |
+
}
|
116 |
+
]
|
117 |
+
},
|
118 |
+
"system-libraries": {
|
119 |
+
"description": "Include drivers which need additional libraries"
|
120 |
+
},
|
121 |
+
"tools": {
|
122 |
+
"description": "Builds gdal and ogr executables"
|
123 |
+
}
|
124 |
+
}
|
125 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdcm/Fix-Cmake_DIR.patch
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMake/ExportConfiguration/GDCMConfig.cmake.in b/CMake/ExportConfiguration/GDCMConfig.cmake.in
|
2 |
+
index f8e9d0b..ab28546 100644
|
3 |
+
--- a/CMake/ExportConfiguration/GDCMConfig.cmake.in
|
4 |
+
+++ b/CMake/ExportConfiguration/GDCMConfig.cmake.in
|
5 |
+
@@ -33,28 +33,28 @@ if(GDCM_USE_VTK)
|
6 |
+
set(GDCM_VTK_DIR "@GDCM_VTK_DIR_CONFIG@")
|
7 |
+
endif()
|
8 |
+
|
9 |
+
-get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
10 |
+
-if(EXISTS ${SELF_DIR}/GDCMTargets.cmake)
|
11 |
+
+get_filename_component(GDCM_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
12 |
+
+if(EXISTS ${GDCM_SELF_DIR}/GDCMTargets.cmake)
|
13 |
+
# This is an install tree
|
14 |
+
- include(${SELF_DIR}/GDCMTargets.cmake)
|
15 |
+
- get_filename_component(GDCM_INCLUDE_ROOT "${SELF_DIR}/../../@GDCM_INSTALL_INCLUDE_DIR@" ABSOLUTE)
|
16 |
+
+ include(${GDCM_SELF_DIR}/GDCMTargets.cmake)
|
17 |
+
+ get_filename_component(GDCM_INCLUDE_ROOT "${GDCM_SELF_DIR}/../../@GDCM_INSTALL_INCLUDE_DIR@" ABSOLUTE)
|
18 |
+
set(GDCM_INCLUDE_DIRS ${GDCM_INCLUDE_ROOT})
|
19 |
+
- get_filename_component(GDCM_LIB_ROOT "${SELF_DIR}/../../@GDCM_INSTALL_LIB_DIR@" ABSOLUTE)
|
20 |
+
+ get_filename_component(GDCM_LIB_ROOT "${GDCM_SELF_DIR}/../../@GDCM_INSTALL_LIB_DIR@" ABSOLUTE)
|
21 |
+
set(GDCM_LIBRARY_DIRS ${GDCM_LIB_ROOT})
|
22 |
+
else()
|
23 |
+
- if(EXISTS ${SELF_DIR}/GDCMExports.cmake)
|
24 |
+
+ if(EXISTS ${GDCM_SELF_DIR}/GDCMExports.cmake)
|
25 |
+
# This is a build tree
|
26 |
+
set( GDCM_INCLUDE_DIRS "@GDCM_INCLUDE_PATH@")
|
27 |
+
set(GDCM_LIBRARY_DIRS "@GDCM_LIBRARY_DIR@")
|
28 |
+
|
29 |
+
- include(${SELF_DIR}/GDCMExports.cmake)
|
30 |
+
+ include(${GDCM_SELF_DIR}/GDCMExports.cmake)
|
31 |
+
|
32 |
+
else()
|
33 |
+
message(FATAL_ERROR "ooops")
|
34 |
+
endif()
|
35 |
+
endif()
|
36 |
+
|
37 |
+
-set(GDCM_USE_FILE ${SELF_DIR}/UseGDCM.cmake)
|
38 |
+
+set(GDCM_USE_FILE ${GDCM_SELF_DIR}/UseGDCM.cmake)
|
39 |
+
|
40 |
+
# Backward compatible part:
|
41 |
+
set(GDCM_FOUND TRUE)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdcm/fix-share-path.patch
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index 6ac16ab..842d833 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -246,15 +246,15 @@ if(NOT GDCM_INSTALL_LIB_DIR)
|
6 |
+
endif()
|
7 |
+
|
8 |
+
if(NOT GDCM_INSTALL_DATA_DIR)
|
9 |
+
- set(GDCM_INSTALL_DATA_DIR "share/${subdir}")
|
10 |
+
+ set(GDCM_INSTALL_DATA_DIR "share/${projectname}")
|
11 |
+
endif()
|
12 |
+
|
13 |
+
if(NOT GDCM_INSTALL_INCLUDE_DIR)
|
14 |
+
- set(GDCM_INSTALL_INCLUDE_DIR "include/${subdir}")
|
15 |
+
+ set(GDCM_INSTALL_INCLUDE_DIR "include/${projectname}")
|
16 |
+
endif()
|
17 |
+
|
18 |
+
if(NOT GDCM_INSTALL_DOC_DIR)
|
19 |
+
- set(GDCM_INSTALL_DOC_DIR "share/doc/${subdir}")
|
20 |
+
+ set(GDCM_INSTALL_DOC_DIR "share/doc/${projectname}")
|
21 |
+
endif()
|
22 |
+
|
23 |
+
if(NOT GDCM_INSTALL_MAN_DIR)
|
24 |
+
@@ -262,7 +262,7 @@ if(NOT GDCM_INSTALL_MAN_DIR)
|
25 |
+
endif()
|
26 |
+
|
27 |
+
if(NOT GDCM_INSTALL_PACKAGE_DIR)
|
28 |
+
- set(GDCM_INSTALL_PACKAGE_DIR ${GDCM_INSTALL_LIB_DIR}/${subdir}
|
29 |
+
+ set(GDCM_INSTALL_PACKAGE_DIR ${GDCM_INSTALL_LIB_DIR}/${projectname}
|
30 |
+
CACHE INTERNAL "")
|
31 |
+
endif()
|
32 |
+
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdcm/portfile.cmake
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2 |
+
|
3 |
+
vcpkg_from_github(
|
4 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
5 |
+
REPO malaterre/GDCM
|
6 |
+
REF c0824c0ae66e9f9e3c8bddba8b65238c1c28481d # v3.0.7
|
7 |
+
SHA512 1889f18f7164e1395e2cf5fe29b6ccd615f9a31433d1a7bda19cac472b20bc52018ef45bd9d9ca72ecb248c9fd5d895b94bfd111157693f70e0b90cf7b582edd
|
8 |
+
HEAD_REF master
|
9 |
+
PATCHES
|
10 |
+
use-openjpeg-config.patch
|
11 |
+
fix-share-path.patch
|
12 |
+
Fix-Cmake_DIR.patch
|
13 |
+
)
|
14 |
+
|
15 |
+
file(REMOVE "${SOURCE_PATH}/CMake/FindOpenJPEG.cmake")
|
16 |
+
|
17 |
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
18 |
+
set(VCPKG_BUILD_SHARED_LIBS ON)
|
19 |
+
else()
|
20 |
+
set(VCPKG_BUILD_SHARED_LIBS OFF)
|
21 |
+
endif()
|
22 |
+
|
23 |
+
vcpkg_cmake_configure(
|
24 |
+
SOURCE_PATH "${SOURCE_PATH}"
|
25 |
+
OPTIONS
|
26 |
+
-DGDCM_BUILD_DOCBOOK_MANPAGES=OFF
|
27 |
+
-DGDCM_BUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS}
|
28 |
+
-DGDCM_INSTALL_INCLUDE_DIR=include
|
29 |
+
-DGDCM_USE_SYSTEM_EXPAT=ON
|
30 |
+
-DGDCM_USE_SYSTEM_ZLIB=ON
|
31 |
+
-DGDCM_USE_SYSTEM_OPENJPEG=ON
|
32 |
+
-DGDCM_BUILD_TESTING=OFF
|
33 |
+
)
|
34 |
+
|
35 |
+
vcpkg_cmake_install()
|
36 |
+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/gdcm)
|
37 |
+
vcpkg_copy_pdbs()
|
38 |
+
|
39 |
+
file(REMOVE_RECURSE
|
40 |
+
"${CURRENT_PACKAGES_DIR}/debug/include"
|
41 |
+
"${CURRENT_PACKAGES_DIR}/debug/share"
|
42 |
+
)
|
43 |
+
|
44 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMTargets.cmake"
|
45 |
+
"set(CMAKE_IMPORT_FILE_VERSION 1)"
|
46 |
+
"set(CMAKE_IMPORT_FILE_VERSION 1)
|
47 |
+
find_package(OpenJPEG QUIET)"
|
48 |
+
)
|
49 |
+
|
50 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/gdcmConfigure.h" "#define GDCM_SOURCE_DIR \"${SOURCE_PATH}\"" "")
|
51 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/gdcmConfigure.h" "#define GDCM_EXECUTABLE_OUTPUT_PATH \"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin\"" "")
|
52 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/gdcmConfigure.h" "#define GDCM_LIBRARY_OUTPUT_PATH \"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin\"" "")
|
53 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/gdcmConfigure.h" "#define GDCM_CMAKE_INSTALL_PREFIX \"${CURRENT_PACKAGES_DIR}\"" "")
|
54 |
+
|
55 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMConfig.cmake" "set( GDCM_INCLUDE_DIRS \"${SOURCE_PATH}/Source/Common;${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Source/Common;${SOURCE_PATH}/Source/DataStructureAndEncodingDefinition;${SOURCE_PATH}/Source/MediaStorageAndFileFormat;${SOURCE_PATH}/Source/MessageExchangeDefinition;${SOURCE_PATH}/Source/DataDictionary;${SOURCE_PATH}/Source/InformationObjectDefinition\")" "")
|
56 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMConfig.cmake" "set(GDCM_LIBRARY_DIRS \"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/.\")" "")
|
57 |
+
|
58 |
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
59 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
60 |
+
endif()
|
61 |
+
|
62 |
+
file(INSTALL "${SOURCE_PATH}/Copyright.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdcm/use-openjpeg-config.patch
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index f82bfd2..a062170 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -375,7 +375,10 @@ else()
|
6 |
+
endif()
|
7 |
+
|
8 |
+
if(GDCM_USE_SYSTEM_OPENJPEG)
|
9 |
+
- find_package(OpenJPEG 2.0.0 REQUIRED)
|
10 |
+
+ find_package(OpenJPEG REQUIRED)
|
11 |
+
+ if(OPENJPEG_MAJOR_VERSION VERSION_LESS 2)
|
12 |
+
+ message( FATAL_ERROR "You need at least OpenJPEG 2")
|
13 |
+
+ endif()
|
14 |
+
set(GDCM_OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARIES})
|
15 |
+
else()
|
16 |
+
set(GDCM_OPENJPEG_LIBRARIES gdcmopenjp2)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdcm/vcpkg.json
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "gdcm",
|
3 |
+
"version": "3.0.7",
|
4 |
+
"port-version": 4,
|
5 |
+
"description": "Grassroots DICOM library",
|
6 |
+
"homepage": "https://github.com/malaterre/GDCM",
|
7 |
+
"supports": "!uwp & !(windows & arm)",
|
8 |
+
"dependencies": [
|
9 |
+
"expat",
|
10 |
+
"openjpeg",
|
11 |
+
{
|
12 |
+
"name": "vcpkg-cmake",
|
13 |
+
"host": true
|
14 |
+
},
|
15 |
+
{
|
16 |
+
"name": "vcpkg-cmake-config",
|
17 |
+
"host": true
|
18 |
+
},
|
19 |
+
"zlib"
|
20 |
+
]
|
21 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdcm2/portfile.cmake
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdcm2/vcpkg.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "gdcm2",
|
3 |
+
"version-string": "deprecated",
|
4 |
+
"port-version": 1,
|
5 |
+
"description": "This port was renamed to gdcm. The gdcm2 name is deprecated.",
|
6 |
+
"homepage": "https://github.com/malaterre/GDCM",
|
7 |
+
"dependencies": [
|
8 |
+
"gdcm"
|
9 |
+
]
|
10 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdk-pixbuf/fix_build.patch
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/build-aux/post-install.bat b/build-aux/post-install.bat
|
2 |
+
index 6994d49e1..b4789dd62 100644
|
3 |
+
--- a/build-aux/post-install.bat
|
4 |
+
+++ b/build-aux/post-install.bat
|
5 |
+
@@ -7,8 +7,8 @@ set binary_version=%3
|
6 |
+
set libdir_windows=%libdir:/=\%
|
7 |
+
|
8 |
+
if not "%DESTDIR%" == "" goto warn_msg
|
9 |
+
-if not exist %libdir_windows%\gdk-pixbuf-2.0\%binary_version%\ mkdir %libdir_windows%\gdk-pixbuf-2.0\%binary_version%
|
10 |
+
-%bindir%\gdk-pixbuf-query-loaders > %libdir_windows%\gdk-pixbuf-2.0\%binary_version%\loaders.cache
|
11 |
+
+if not exist %libdir_windows%\..\gdk-pixbuf-2.0\%binary_version%\ mkdir %libdir_windows%\..\gdk-pixbuf-2.0\%binary_version%
|
12 |
+
+%bindir%\gdk-pixbuf-query-loaders > %libdir_windows%\..\gdk-pixbuf-2.0\%binary_version%\loaders.cache
|
13 |
+
|
14 |
+
goto end
|
15 |
+
|
16 |
+
@@ -18,7 +18,7 @@ echo *** Warning: loaders.cache not built
|
17 |
+
echo ***
|
18 |
+
echo *** You should generate this file manually on the host system
|
19 |
+
echo *** using:
|
20 |
+
-echo *** gdk-pixbuf-query-loaders ^> %libdir_windows%\gdk-pixbuf-2.0\%binary_version%\loaders.cache
|
21 |
+
+echo *** gdk-pixbuf-query-loaders ^> %libdir_windows%\..\gdk-pixbuf-2.0\%binary_version%\loaders.cache
|
22 |
+
echo ***
|
23 |
+
|
24 |
+
:end
|
25 |
+
diff --git a/build-aux/post-install.sh b/build-aux/post-install.sh
|
26 |
+
index 661bceeef..0b1a46527 100644
|
27 |
+
--- a/build-aux/post-install.sh
|
28 |
+
+++ b/build-aux/post-install.sh
|
29 |
+
@@ -5,14 +5,14 @@ libdir="$2"
|
30 |
+
binary_version="$3"
|
31 |
+
|
32 |
+
if [ -z "$DESTDIR" ]; then
|
33 |
+
- mkdir -p "$libdir/gdk-pixbuf-2.0/$binary_version"
|
34 |
+
- $bindir/gdk-pixbuf-query-loaders > "$libdir/gdk-pixbuf-2.0/$binary_version/loaders.cache"
|
35 |
+
+ mkdir -p "$libdir/../gdk-pixbuf-2.0/$binary_version"
|
36 |
+
+ $bindir/gdk-pixbuf-query-loaders > "$libdir/../gdk-pixbuf-2.0/$binary_version/loaders.cache"
|
37 |
+
else
|
38 |
+
echo "***"
|
39 |
+
echo "*** Warning: loaders.cache not built"
|
40 |
+
echo "***"
|
41 |
+
echo "*** You should generate this file manually on the host system"
|
42 |
+
echo "*** using:"
|
43 |
+
- echo "*** gdk-pixbuf-query-loaders > $libdir/gdk-pixbuf-2.0/$binary_version/loaders.cache"
|
44 |
+
+ echo "*** gdk-pixbuf-query-loaders > $libdir/../gdk-pixbuf-2.0/$binary_version/loaders.cache"
|
45 |
+
echo "***"
|
46 |
+
fi
|
47 |
+
diff --git a/meson.build b/meson.build
|
48 |
+
index c38607029..4b5df91ae 100644
|
49 |
+
--- a/meson.build
|
50 |
+
+++ b/meson.build
|
51 |
+
@@ -308,12 +310,12 @@ endif
|
52 |
+
# Don't check and build the jpeg loader if native_windows_loaders is true
|
53 |
+
if get_option('jpeg') and not native_windows_loaders
|
54 |
+
if cc.has_header('jpeglib.h')
|
55 |
+
- jpeg_dep = cc.find_library('jpeg', required: false)
|
56 |
+
- if cc.get_id() == 'msvc' and not jpeg_dep.found()
|
57 |
+
+ jpeg_dep = dependency('libjpeg', required: false)
|
58 |
+
+ #if cc.get_id() == 'msvc' and not jpeg_dep.found()
|
59 |
+
# The IJG JPEG library builds the .lib file as libjpeg.lib in its MSVC build system,
|
60 |
+
# so look for it as well when jpeg.lib cannot be found
|
61 |
+
- jpeg_dep = cc.find_library('libjpeg', required: false)
|
62 |
+
- endif
|
63 |
+
+ # jpeg_dep = cc.find_library('libjpeg', required: false)
|
64 |
+
+ #endif
|
65 |
+
if jpeg_dep.found() and cc.has_function('jpeg_destroy_decompress', dependencies: jpeg_dep)
|
66 |
+
enabled_loaders += 'jpeg'
|
67 |
+
loaders_deps += jpeg_dep
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdk-pixbuf/fix_build_error_windows.patch
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/meson.build b/meson.build
|
2 |
+
index b39c55d..4b050c7 100644
|
3 |
+
--- a/meson.build
|
4 |
+
+++ b/meson.build
|
5 |
+
@@ -89,8 +89,14 @@ if cc.has_function('round', dependencies: mathlib_dep)
|
6 |
+
gdk_pixbuf_conf.set('HAVE_ROUND', 1)
|
7 |
+
endif
|
8 |
+
|
9 |
+
-if cc.has_function('lrint', dependencies: mathlib_dep)
|
10 |
+
- gdk_pixbuf_conf.set('HAVE_LRINT', 1)
|
11 |
+
+if cc.get_id() == 'msvc'
|
12 |
+
+ if cc.has_function('lrint', dependencies: mathlib_dep, args: '-Oi-')
|
13 |
+
+ gdk_pixbuf_conf.set('HAVE_LRINT', 1)
|
14 |
+
+ endif
|
15 |
+
+else
|
16 |
+
+ if cc.has_function('lrint', dependencies: mathlib_dep)
|
17 |
+
+ gdk_pixbuf_conf.set('HAVE_LRINT', 1)
|
18 |
+
+ endif
|
19 |
+
endif
|
20 |
+
|
21 |
+
if cc.has_function('bind_textdomain_codeset', prefix: '#include <libintl.h>')
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdk-pixbuf/portfile.cmake
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
set(GDK_PIXBUF_VERSION 2.42)
|
2 |
+
set(GDK_PIXBUF_PATCH 2)
|
3 |
+
|
4 |
+
vcpkg_download_distfile(ARCHIVE
|
5 |
+
URLS "https://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/${GDK_PIXBUF_VERSION}/gdk-pixbuf-${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}.tar.xz"
|
6 |
+
FILENAME "gdk-pixbuf-${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}.tar.xz"
|
7 |
+
SHA512 f341d032ea410efed7a35f8ca6a7389bf988f663dae16e774d114d6f11611e9e182c835e90d752b71c258c905cc5c4c785ea697feed5e6921a2a676c9deaa5f2
|
8 |
+
)
|
9 |
+
|
10 |
+
vcpkg_extract_source_archive_ex(
|
11 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
12 |
+
ARCHIVE ${ARCHIVE}
|
13 |
+
PATCHES
|
14 |
+
fix_build.patch
|
15 |
+
fix_build_error_windows.patch
|
16 |
+
)
|
17 |
+
if(VCPKG_TARGET_IS_WINDOWS)
|
18 |
+
#list(APPEND OPTIONS -Dnative_windows_loaders=true) # Use Windows system components to handle BMP, EMF, GIF, ICO, JPEG, TIFF and WMF images, overriding jpeg and tiff. To build this into gdk-pixbuf, pass in windows" with the other loaders to build in or use "all" with the builtin_loaders option
|
19 |
+
endif()
|
20 |
+
vcpkg_configure_meson(
|
21 |
+
SOURCE_PATH ${SOURCE_PATH}
|
22 |
+
OPTIONS
|
23 |
+
-Dman=false # Whether to generate man pages (requires xlstproc)
|
24 |
+
-Dgtk_doc=false # Whether to generate the API reference (requires GTK-Doc)
|
25 |
+
-Ddocs=false
|
26 |
+
-Dpng=true # Enable PNG loader (requires libpng)
|
27 |
+
-Dtiff=true # Enable TIFF loader (requires libtiff), disabled on Windows if "native_windows_loaders" is used
|
28 |
+
-Djpeg=true # Enable JPEG loader (requires libjpeg), disabled on Windows if "native_windows_loaders" is used
|
29 |
+
-Dintrospection=disabled # Whether to generate the API introspection data (requires GObject-Introspection)
|
30 |
+
-Drelocatable=true # Whether to enable application bundle relocation support
|
31 |
+
-Dinstalled_tests=false
|
32 |
+
-Dgio_sniffing=false # Perform file type detection using GIO (Unused on MacOS and Windows)
|
33 |
+
-Dbuiltin_loaders=all # since it is unclear where loadable plugins should be located;
|
34 |
+
# Comma-separated list of loaders to build into gdk-pixbuf, or "none", or "all" to build all buildable loaders into gdk-pixbuf
|
35 |
+
ADDITIONAL_NATIVE_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
|
36 |
+
glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
|
37 |
+
ADDITIONAL_CROSS_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
|
38 |
+
glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
|
39 |
+
)
|
40 |
+
vcpkg_install_meson(ADD_BIN_TO_PATH)
|
41 |
+
|
42 |
+
# Fix paths in pc file.
|
43 |
+
set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gdk-pixbuf-2.0.pc")
|
44 |
+
if(EXISTS "${_file}")
|
45 |
+
file(READ "${_file}" _contents)
|
46 |
+
string(REPLACE [[${bindir}]] "\${bindir}/../../tools/${PORT}" _contents "${_contents}")
|
47 |
+
string(REPLACE [[gdk_pixbuf_binarydir=${libdir}/gdk-pixbuf-2.0/2.10.0]] "gdk_pixbuf_binarydir=\${libdir}/../gdk-pixbuf-2.0/2.10.0" _contents "${_contents}")
|
48 |
+
file(WRITE "${_file}" "${_contents}")
|
49 |
+
endif()
|
50 |
+
set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gdk-pixbuf-2.0.pc")
|
51 |
+
if(EXISTS "${_file}")
|
52 |
+
file(READ "${_file}" _contents)
|
53 |
+
string(REPLACE [[${bindir}]] "\${bindir}/../tools/${PORT}" _contents "${_contents}")
|
54 |
+
string(REPLACE [[gdk_pixbuf_binarydir=${libdir}/gdk-pixbuf-2.0/2.10.0]] "gdk_pixbuf_binarydir=\${libdir}/../gdk-pixbuf-2.0/2.10.0" _contents "${_contents}")
|
55 |
+
file(WRITE "${_file}" "${_contents}")
|
56 |
+
endif()
|
57 |
+
|
58 |
+
vcpkg_fixup_pkgconfig()
|
59 |
+
|
60 |
+
set(TOOL_NAMES gdk-pixbuf-csource gdk-pixbuf-pixdata gdk-pixbuf-query-loaders gdk-pixbuf-thumbnailer)
|
61 |
+
|
62 |
+
if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_TARGET_IS_WINDOWS)
|
63 |
+
list(REMOVE_ITEM TOOL_NAMES gdk-pixbuf-thumbnailer)
|
64 |
+
endif()
|
65 |
+
|
66 |
+
vcpkg_copy_pdbs()
|
67 |
+
vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN)
|
68 |
+
|
69 |
+
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
70 |
+
|
71 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gdk-pixbuf/vcpkg.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "gdk-pixbuf",
|
3 |
+
"version": "2.42.2",
|
4 |
+
"port-version": 2,
|
5 |
+
"description": "Image loading library.",
|
6 |
+
"homepage": "https://developer.gnome.org/gdk-pixbuf/",
|
7 |
+
"dependencies": [
|
8 |
+
"gettext",
|
9 |
+
"glib",
|
10 |
+
{
|
11 |
+
"name": "glib",
|
12 |
+
"host": true
|
13 |
+
},
|
14 |
+
"libpng",
|
15 |
+
"tiff",
|
16 |
+
{
|
17 |
+
"name": "vcpkg-tool-meson",
|
18 |
+
"host": true
|
19 |
+
},
|
20 |
+
"zlib"
|
21 |
+
]
|
22 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gemmlowp/portfile.cmake
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
2 |
+
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
3 |
+
endif()
|
4 |
+
|
5 |
+
vcpkg_from_github(
|
6 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
7 |
+
REPO google/gemmlowp
|
8 |
+
REF daf630d3d0c439dbe22229838a5ba1bc5f82908d
|
9 |
+
SHA512 8d1a422bbf2495dcec1c30147bc96d0a2ca494220a45050937f84567c3352cd8916f07d1bbab68c8d36ae7ce3e9b8bee8b518900e21967a3185bf7ff25812785
|
10 |
+
HEAD_REF master
|
11 |
+
)
|
12 |
+
|
13 |
+
vcpkg_cmake_configure(
|
14 |
+
SOURCE_PATH "${SOURCE_PATH}/contrib"
|
15 |
+
OPTIONS
|
16 |
+
-DBUILD_TESTING=OFF
|
17 |
+
)
|
18 |
+
vcpkg_cmake_install()
|
19 |
+
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
|
20 |
+
|
21 |
+
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
22 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gemmlowp/vcpkg.json
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "gemmlowp",
|
3 |
+
"version-date": "2021-09-28",
|
4 |
+
"description": "Low-precision matrix multiplication",
|
5 |
+
"homepage": "https://github.com/google/gemmlowp",
|
6 |
+
"license": "Apache-2.0",
|
7 |
+
"dependencies": [
|
8 |
+
{
|
9 |
+
"name": "vcpkg-cmake",
|
10 |
+
"host": true
|
11 |
+
},
|
12 |
+
{
|
13 |
+
"name": "vcpkg-cmake-config",
|
14 |
+
"host": true
|
15 |
+
}
|
16 |
+
]
|
17 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/genann/CMakeLists.txt
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
cmake_minimum_required(VERSION 3.11)
|
2 |
+
project(genann)
|
3 |
+
|
4 |
+
set(SRC_FILES
|
5 |
+
genann.c
|
6 |
+
)
|
7 |
+
|
8 |
+
add_library(genann ${SRC_FILES})
|
9 |
+
|
10 |
+
target_include_directories(genann PUBLIC
|
11 |
+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
|
12 |
+
$<INSTALL_INTERFACE:include/genann>
|
13 |
+
)
|
14 |
+
|
15 |
+
# Install targets
|
16 |
+
install(TARGETS genann
|
17 |
+
RUNTIME DESTINATION bin
|
18 |
+
LIBRARY DESTINATION lib
|
19 |
+
ARCHIVE DESTINATION lib
|
20 |
+
)
|
21 |
+
|
22 |
+
# Install headers
|
23 |
+
if (INSTALL_HEADERS)
|
24 |
+
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/genann.h DESTINATION include/genann)
|
25 |
+
endif()
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/genann/portfile.cmake
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2 |
+
|
3 |
+
vcpkg_from_github(
|
4 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
5 |
+
REPO codeplea/genann
|
6 |
+
REF 122243f9449b3e33a4e11450b70c10576d4559d7
|
7 |
+
SHA512 d70cb8bc678d80ed3e790866f6060850cf9309eefe90d3ca4d77e28538639a927333d49c4d1af3e81123b8e88224f2f51b74ec41ca22639a276359568652ed15
|
8 |
+
HEAD_REF master
|
9 |
+
)
|
10 |
+
|
11 |
+
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
12 |
+
|
13 |
+
vcpkg_configure_cmake(
|
14 |
+
SOURCE_PATH ${SOURCE_PATH}
|
15 |
+
PREFER_NINJA
|
16 |
+
OPTIONS_RELEASE -DINSTALL_HEADERS=ON
|
17 |
+
OPTIONS_DEBUG -DINSTALL_HEADERS=OFF
|
18 |
+
)
|
19 |
+
|
20 |
+
vcpkg_install_cmake()
|
21 |
+
|
22 |
+
# Handle copyright
|
23 |
+
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/genann)
|
24 |
+
file(RENAME ${CURRENT_PACKAGES_DIR}/share/genann/LICENSE ${CURRENT_PACKAGES_DIR}/share/genann/copyright)
|
25 |
+
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/genann/vcpkg.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "genann",
|
3 |
+
"version-string": "2019-07-10",
|
4 |
+
"port-version": 1,
|
5 |
+
"description": "Genann is a minimal, well-tested library for training and using feedforward artificial neural networks (ANN) in C.",
|
6 |
+
"homepage": "https://github.com/codeplea/genann"
|
7 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geogram/Config.cmake.in
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@PACKAGE_INIT@
|
2 |
+
|
3 |
+
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
|
4 |
+
check_required_components("@PROJECT_NAME@")
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geogram/fix-vcpkg-install.patch
ADDED
@@ -0,0 +1,211 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index 8713b2f..0e034fa 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -51,7 +51,7 @@ set(VORPALINE_VERSION_MINOR 7)
|
6 |
+
set(VORPALINE_VERSION_PATCH 6)
|
7 |
+
set(VORPALINE_VERSION ${VORPALINE_VERSION_MAJOR}.${VORPALINE_VERSION_MINOR}.${VORPALINE_VERSION_PATCH})
|
8 |
+
|
9 |
+
-set(VORPALINE_INCLUDE_SUBPATH geogram${VORPALINE_VERSION_MAJOR})
|
10 |
+
+set(VORPALINE_INCLUDE_SUBPATH ./)
|
11 |
+
|
12 |
+
# Determine the current Build-OS (Build-platform without the compiler info)
|
13 |
+
string(REGEX REPLACE "-[^-]+$" "" VORPALINE_OS ${VORPALINE_PLATFORM})
|
14 |
+
@@ -116,6 +116,7 @@ endif()
|
15 |
+
add_subdirectory(src/lib/third_party)
|
16 |
+
|
17 |
+
if(GEOGRAM_WITH_GRAPHICS)
|
18 |
+
+ find_package(GLFW3 REQUIRED)
|
19 |
+
add_subdirectory(src/lib/geogram_gfx)
|
20 |
+
endif()
|
21 |
+
|
22 |
+
@@ -146,7 +147,44 @@ file(REMOVE ${CMAKE_BINARY_DIR}/doc/LICENSE.txt)
|
23 |
+
|
24 |
+
# FindGeogram.cmake
|
25 |
+
|
26 |
+
-install(FILES cmake/FindGeogram.cmake DESTINATION lib/cmake/modules COMPONENT devkit)
|
27 |
+
+# This installation is not suitable for vcpkg
|
28 |
+
+# install(FILES cmake/FindGeogram.cmake DESTINATION lib/cmake/modules COMPONENT devkit)
|
29 |
+
+
|
30 |
+
+set(config_install_dir "share/geogram")
|
31 |
+
+set(include_install_dir "include")
|
32 |
+
+set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
|
33 |
+
+
|
34 |
+
+# Configuration
|
35 |
+
+set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
|
36 |
+
+set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
|
37 |
+
+set(targets_export_name "${PROJECT_NAME}Targets")
|
38 |
+
+set(namespace "${PROJECT_NAME}::")
|
39 |
+
+
|
40 |
+
+# Include module with fuction 'write_basic_package_version_file'
|
41 |
+
+include(CMakePackageConfigHelpers)
|
42 |
+
+
|
43 |
+
+write_basic_package_version_file(
|
44 |
+
+ "${version_config}" COMPATIBILITY SameMajorVersion VERSION ${VORPALINE_VERSION}
|
45 |
+
+)
|
46 |
+
+
|
47 |
+
+configure_package_config_file(
|
48 |
+
+ "cmake/Config.cmake.in"
|
49 |
+
+ "${project_config}"
|
50 |
+
+ INSTALL_DESTINATION "${config_install_dir}"
|
51 |
+
+)
|
52 |
+
+
|
53 |
+
+# Config
|
54 |
+
+install(
|
55 |
+
+ FILES "${project_config}" "${version_config}"
|
56 |
+
+ DESTINATION "${config_install_dir}"
|
57 |
+
+)
|
58 |
+
+
|
59 |
+
+# Config
|
60 |
+
+install(
|
61 |
+
+ EXPORT "${targets_export_name}"
|
62 |
+
+ NAMESPACE "${namespace}"
|
63 |
+
+ DESTINATION "${config_install_dir}"
|
64 |
+
+)
|
65 |
+
|
66 |
+
# Configure CPack
|
67 |
+
|
68 |
+
diff --git a/src/lib/geogram/CMakeLists.txt b/src/lib/geogram/CMakeLists.txt
|
69 |
+
index 49cb2ba..8985137 100644
|
70 |
+
--- a/src/lib/geogram/CMakeLists.txt
|
71 |
+
+++ b/src/lib/geogram/CMakeLists.txt
|
72 |
+
@@ -61,8 +61,19 @@ if(WIN32)
|
73 |
+
target_link_libraries(geogram psapi)
|
74 |
+
endif()
|
75 |
+
|
76 |
+
+if(WIN32 AND VORPALINE_BUILD_DYNAMIC)
|
77 |
+
+ target_compile_definitions(geogram PUBLIC GEO_DYNAMIC_LIBS)
|
78 |
+
+endif()
|
79 |
+
+
|
80 |
+
# Install the library
|
81 |
+
-install_devkit_targets(geogram)
|
82 |
+
+install(
|
83 |
+
+ TARGETS geogram
|
84 |
+
+ EXPORT "${PROJECT_NAME}Targets"
|
85 |
+
+ LIBRARY DESTINATION "lib"
|
86 |
+
+ ARCHIVE DESTINATION "lib"
|
87 |
+
+ RUNTIME DESTINATION "bin"
|
88 |
+
+ INCLUDES DESTINATION "include"
|
89 |
+
+)
|
90 |
+
|
91 |
+
# Install include files for the standard devkit
|
92 |
+
install(
|
93 |
+
diff --git a/src/lib/geogram_gfx/CMakeLists.txt b/src/lib/geogram_gfx/CMakeLists.txt
|
94 |
+
index b155975..ad66440 100644
|
95 |
+
--- a/src/lib/geogram_gfx/CMakeLists.txt
|
96 |
+
+++ b/src/lib/geogram_gfx/CMakeLists.txt
|
97 |
+
@@ -47,14 +47,21 @@ if(VORPALINE_BUILD_DYNAMIC)
|
98 |
+
endif()
|
99 |
+
|
100 |
+
# Install the library
|
101 |
+
-install_devkit_targets(geogram_gfx)
|
102 |
+
+install(
|
103 |
+
+ TARGETS geogram_gfx
|
104 |
+
+ EXPORT "${PROJECT_NAME}Targets"
|
105 |
+
+ LIBRARY DESTINATION "lib"
|
106 |
+
+ ARCHIVE DESTINATION "lib"
|
107 |
+
+ RUNTIME DESTINATION "bin"
|
108 |
+
+ INCLUDES DESTINATION "include"
|
109 |
+
+)
|
110 |
+
|
111 |
+
# Install include files for the standard devkit
|
112 |
+
install(
|
113 |
+
DIRECTORY .
|
114 |
+
DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram_gfx
|
115 |
+
COMPONENT devkit
|
116 |
+
- FILES_MATCHING PATTERN *.h
|
117 |
+
+ FILES_MATCHING PATTERN *.h PATTERN *.xpm # xpm is the colrbar file
|
118 |
+
)
|
119 |
+
|
120 |
+
# Install include files for the full devkit
|
121 |
+
@@ -62,7 +69,7 @@ install(
|
122 |
+
DIRECTORY .
|
123 |
+
DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram_gfx
|
124 |
+
COMPONENT devkit-full
|
125 |
+
- FILES_MATCHING PATTERN *.h
|
126 |
+
+ FILES_MATCHING PATTERN *.h PATTERN *.xpm # xpm is the colrbar file
|
127 |
+
)
|
128 |
+
|
129 |
+
install(
|
130 |
+
diff --git a/src/lib/third_party/numerics/CMakeLists.txt b/src/lib/third_party/numerics/CMakeLists.txt
|
131 |
+
index 8fd39b0..46d5cc6 100644
|
132 |
+
--- a/src/lib/third_party/numerics/CMakeLists.txt
|
133 |
+
+++ b/src/lib/third_party/numerics/CMakeLists.txt
|
134 |
+
@@ -10,17 +10,19 @@ endif()
|
135 |
+
|
136 |
+
include_directories(${GEOGRAM_SOURCE_DIR}/src/lib/third_party/numerics/INCLUDE)
|
137 |
+
|
138 |
+
-aux_source_directories(SOURCES "Source Files" .)
|
139 |
+
+set(LAPACK_lapack_WORKS TRUE)
|
140 |
+
+find_package(BLAS REQUIRED)
|
141 |
+
+find_package(LAPACK REQUIRED)
|
142 |
+
+ aux_source_directories(SOURCES "Source Files" .)
|
143 |
+
aux_source_directories(SOURCES "Source Files\\LIBF2C" LIBF2C)
|
144 |
+
-aux_source_directories(SOURCES "Source Files\\CBLAS" CBLAS)
|
145 |
+
-aux_source_directories(SOURCES "Source Files\\CLAPACK" CLAPACK)
|
146 |
+
aux_source_directories(SOURCES "Source Files\\SUPERLU" SUPERLU)
|
147 |
+
aux_source_directories(SOURCES "Source Files\\ARPACK" ARPACK)
|
148 |
+
aux_source_directories(SOURCES "Source Files\\ARPACK_UTIL" ARPACK_UTIL)
|
149 |
+
|
150 |
+
add_library(geogram_num_3rdparty ${SOURCES})
|
151 |
+
|
152 |
+
-if(UNIX)
|
153 |
+
+target_link_libraries(geogram_num_3rdparty ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
|
154 |
+
+ if(UNIX)
|
155 |
+
target_link_libraries(geogram_num_3rdparty m)
|
156 |
+
endif()
|
157 |
+
|
158 |
+
diff --git a/src/lib/third_party/numerics/LIBF2C/getarg_.c b/src/lib/third_party/numerics/LIBF2C/getarg_.c
|
159 |
+
index 2b69a1e..a504538 100644
|
160 |
+
--- a/src/lib/third_party/numerics/LIBF2C/getarg_.c
|
161 |
+
+++ b/src/lib/third_party/numerics/LIBF2C/getarg_.c
|
162 |
+
@@ -17,20 +17,20 @@ VOID getarg_(n, s, ls) ftnint *n; char *s; ftnlen ls;
|
163 |
+
void getarg_(ftnint *n, char *s, ftnlen ls)
|
164 |
+
#endif
|
165 |
+
{
|
166 |
+
- extern int xargc;
|
167 |
+
- extern char **xargv;
|
168 |
+
- Const char *t;
|
169 |
+
- int i;
|
170 |
+
+ // extern int xargc;
|
171 |
+
+ // extern char **xargv;
|
172 |
+
+ // Const char *t;
|
173 |
+
+ // int i;
|
174 |
+
|
175 |
+
- if(*n>=0 && *n<xargc)
|
176 |
+
- t = xargv[*n];
|
177 |
+
- else
|
178 |
+
- t = "";
|
179 |
+
- for(i = 0; i<ls && *t!='\0' ; ++i)
|
180 |
+
- *s++ = *t++;
|
181 |
+
- for( ; i<ls ; ++i)
|
182 |
+
- *s++ = ' ';
|
183 |
+
- }
|
184 |
+
+ // if(*n>=0 && *n<xargc)
|
185 |
+
+ // t = xargv[*n];
|
186 |
+
+ // else
|
187 |
+
+ // t = "";
|
188 |
+
+ // for(i = 0; i<ls && *t!='\0' ; ++i)
|
189 |
+
+ // *s++ = *t++;
|
190 |
+
+ // for( ; i<ls ; ++i)
|
191 |
+
+ // *s++ = ' ';
|
192 |
+
+}
|
193 |
+
#ifdef __cplusplus
|
194 |
+
}
|
195 |
+
#endif
|
196 |
+
diff --git a/src/lib/third_party/numerics/LIBF2C/iargc_.c b/src/lib/third_party/numerics/LIBF2C/iargc_.c
|
197 |
+
index 2f29da0..48dfd9f 100644
|
198 |
+
--- a/src/lib/third_party/numerics/LIBF2C/iargc_.c
|
199 |
+
+++ b/src/lib/third_party/numerics/LIBF2C/iargc_.c
|
200 |
+
@@ -9,8 +9,9 @@ ftnint iargc_()
|
201 |
+
ftnint iargc_(void)
|
202 |
+
#endif
|
203 |
+
{
|
204 |
+
-extern int xargc;
|
205 |
+
-return ( xargc - 1 );
|
206 |
+
+// extern int xargc;
|
207 |
+
+// return ( xargc - 1 );
|
208 |
+
+ return -1;
|
209 |
+
}
|
210 |
+
#ifdef __cplusplus
|
211 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geogram/portfile.cmake
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_from_github(
|
2 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
3 |
+
REPO alicevision/geogram
|
4 |
+
REF 8b2ae6148c7ab1564fa2700673b4275296ce80d3 #1.7.6
|
5 |
+
SHA512 0ec0deded92c8d5d100b6e77f8cfbbbaf7b744c230e10abd0b86861960cda9713ff65209575fdc09034afcb0e9137428a20c00d399c09fd58ce541fed2105a2d
|
6 |
+
PATCHES
|
7 |
+
fix-vcpkg-install.patch
|
8 |
+
)
|
9 |
+
|
10 |
+
file(COPY ${CURRENT_PORT_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}/cmake)
|
11 |
+
|
12 |
+
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
13 |
+
FEATURES
|
14 |
+
"graphics" GEOGRAM_WITH_GRAPHICS
|
15 |
+
)
|
16 |
+
|
17 |
+
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
18 |
+
set(VORPALINE_BUILD_DYNAMIC FALSE)
|
19 |
+
if (VCPKG_TARGET_IS_WINDOWS)
|
20 |
+
set(VORPALINE_PLATFORM Win-vs-generic)
|
21 |
+
endif()
|
22 |
+
if (VCPKG_CRT_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS)
|
23 |
+
message("geogram on Windows with CRT dynamic linkage only supports dynamic library linkage. Building dynamic.")
|
24 |
+
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
25 |
+
set(VORPALINE_PLATFORM Win-vs-dynamic-generic)
|
26 |
+
endif()
|
27 |
+
if (VCPKG_TARGET_IS_LINUX)
|
28 |
+
message("geogram on Linux only supports dynamic library linkage. Building dynamic.")
|
29 |
+
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
30 |
+
set(VORPALINE_PLATFORM Linux64-gcc-dynamic )
|
31 |
+
endif()
|
32 |
+
if (VCPKG_TARGET_IS_OSX)
|
33 |
+
message("geogram on Darwin only supports dynamic library linkage. Building dynamic.")
|
34 |
+
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
35 |
+
set(VORPALINE_PLATFORM Darwin-clang-dynamic)
|
36 |
+
endif()
|
37 |
+
else()
|
38 |
+
set(VORPALINE_BUILD_DYNAMIC TRUE)
|
39 |
+
if (VCPKG_TARGET_IS_WINDOWS)
|
40 |
+
set(VORPALINE_PLATFORM Win-vs-generic)
|
41 |
+
endif()
|
42 |
+
if (VCPKG_TARGET_IS_LINUX)
|
43 |
+
set(VORPALINE_PLATFORM Linux64-gcc-dynamic )
|
44 |
+
endif()
|
45 |
+
if (VCPKG_TARGET_IS_OSX)
|
46 |
+
set(VORPALINE_PLATFORM Darwin-clang-dynamic)
|
47 |
+
endif()
|
48 |
+
endif()
|
49 |
+
|
50 |
+
vcpkg_configure_cmake(
|
51 |
+
SOURCE_PATH ${SOURCE_PATH}
|
52 |
+
# Geogram cannot be built with ninja because it embeds $(Configuration) in some of the generated paths. These require MSBuild in order to be evaluated.
|
53 |
+
#PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
54 |
+
OPTIONS
|
55 |
+
-DVORPALINE_BUILD_DYNAMIC=${VORPALINE_BUILD_DYNAMIC}
|
56 |
+
-DGEOGRAM_LIB_ONLY=ON
|
57 |
+
-DGEOGRAM_USE_SYSTEM_GLFW3=ON
|
58 |
+
-DVORPALINE_PLATFORM=${VORPALINE_PLATFORM}
|
59 |
+
-DGEOGRAM_WITH_VORPALINE=OFF
|
60 |
+
${FEATURE_OPTIONS}
|
61 |
+
)
|
62 |
+
|
63 |
+
vcpkg_install_cmake()
|
64 |
+
vcpkg_copy_pdbs()
|
65 |
+
vcpkg_fixup_cmake_targets()
|
66 |
+
|
67 |
+
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
68 |
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc)
|
69 |
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc)
|
70 |
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
71 |
+
|
72 |
+
vcpkg_replace_string(
|
73 |
+
${CURRENT_PACKAGES_DIR}/share/geogram/GeogramTargets.cmake
|
74 |
+
[[INTERFACE_INCLUDE_DIRECTORIES "/src/lib;${_IMPORT_PREFIX}/include"]]
|
75 |
+
[[INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"]]
|
76 |
+
)
|
77 |
+
|
78 |
+
# Handle copyright
|
79 |
+
file(INSTALL ${SOURCE_PATH}/doc/devkit/license.dox DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
80 |
+
|
81 |
+
vcpkg_fixup_pkgconfig()
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geogram/vcpkg.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "geogram",
|
3 |
+
"version": "1.7.6",
|
4 |
+
"port-version": 2,
|
5 |
+
"description": "Geogram is a programming library of geometric algorithms.",
|
6 |
+
"homepage": "https://gforge.inria.fr/projects/geogram/",
|
7 |
+
"supports": "!uwp",
|
8 |
+
"dependencies": [
|
9 |
+
"blas",
|
10 |
+
"lapack"
|
11 |
+
],
|
12 |
+
"features": {
|
13 |
+
"graphics": {
|
14 |
+
"description": "Build viewers and geogram_gfx library.",
|
15 |
+
"dependencies": [
|
16 |
+
"glfw3"
|
17 |
+
]
|
18 |
+
}
|
19 |
+
}
|
20 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geographiclib/cxx-library-only.patch
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index eb08bd48..88552153 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -196,6 +196,11 @@ else ()
|
6 |
+
set (DEVELOPER OFF)
|
7 |
+
endif ()
|
8 |
+
|
9 |
+
+set (INSTALL_TOOL_DIR "tools/geographiclib")
|
10 |
+
+file (RELATIVE_PATH PROJECT_LIB_DIR
|
11 |
+
+ "${CMAKE_INSTALL_PREFIX}/${INSTALL_TOOL_DIR}"
|
12 |
+
+ "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
|
13 |
+
+
|
14 |
+
if (NOT MSVC)
|
15 |
+
# Set the run time path for shared libraries for non-Windows machines.
|
16 |
+
# (1) include link path for external packages (not needed with
|
17 |
+
@@ -207,7 +212,7 @@ if (NOT MSVC)
|
18 |
+
# (2) include installed path for GeographicLib.
|
19 |
+
if (NOT APPLE)
|
20 |
+
# Use relative path so that package is relocatable
|
21 |
+
- set (CMAKE_INSTALL_RPATH "\$ORIGIN/../lib${LIB_SUFFIX}")
|
22 |
+
+ set (CMAKE_INSTALL_RPATH "\$ORIGIN/${PROJECT_LIB_DIR}")
|
23 |
+
else ()
|
24 |
+
# cmake 2.8.12 introduced a way to make the package relocatable.
|
25 |
+
# See also INSTALL_RPATH property on the tools.
|
26 |
+
@@ -434,12 +439,12 @@ endif ()
|
27 |
+
# documentation files into the source tree. Skip Apple here because
|
28 |
+
# man/makeusage.sh uses "head --lines -4" to drop the last 4 lines of a
|
29 |
+
# file and there's no simple equivalent for MacOSX
|
30 |
+
-if (NOT WIN32 AND NOT APPLE)
|
31 |
+
+if (NOT WIN32 AND NOT APPLE AND FALSE)
|
32 |
+
find_program (HAVE_POD2MAN pod2man)
|
33 |
+
find_program (HAVE_POD2HTML pod2html)
|
34 |
+
find_program (HAVE_COL col)
|
35 |
+
endif ()
|
36 |
+
-if (HAVE_POD2MAN AND HAVE_POD2HTML AND HAVE_COL)
|
37 |
+
+if (HAVE_POD2MAN AND HAVE_POD2HTML AND HAVE_COL AND FALSE)
|
38 |
+
set (MAINTAINER ON)
|
39 |
+
else ()
|
40 |
+
set (MAINTAINER OFF)
|
41 |
+
@@ -466,25 +471,34 @@ if (WIN32)
|
42 |
+
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
|
43 |
+
endif ()
|
44 |
+
|
45 |
+
+if (SKIP_TOOLS)
|
46 |
+
+ set (TOOLS)
|
47 |
+
+ set (SCRIPTS)
|
48 |
+
+else ()
|
49 |
+
# The list of tools (to be installed into, e.g., /usr/local/bin)
|
50 |
+
set (TOOLS CartConvert ConicProj GeodesicProj GeoConvert GeodSolve
|
51 |
+
GeoidEval Gravity MagneticField Planimeter RhumbSolve TransverseMercatorProj)
|
52 |
+
# The list of scripts (to be installed into, e.g., /usr/local/sbin)
|
53 |
+
set (SCRIPTS geographiclib-get-geoids geographiclib-get-gravity
|
54 |
+
geographiclib-get-magnetic)
|
55 |
+
+endif ()
|
56 |
+
|
57 |
+
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
|
58 |
+
|
59 |
+
# The list of subdirectories to process
|
60 |
+
add_subdirectory (src)
|
61 |
+
add_subdirectory (include/GeographicLib)
|
62 |
+
+if (NOT SKIP_TOOLS)
|
63 |
+
add_subdirectory (tools)
|
64 |
+
+endif ()
|
65 |
+
+if (FALSE)
|
66 |
+
add_subdirectory (man)
|
67 |
+
add_subdirectory (doc)
|
68 |
+
add_subdirectory (js)
|
69 |
+
add_subdirectory (matlab)
|
70 |
+
add_subdirectory (python/geographiclib)
|
71 |
+
add_subdirectory (examples)
|
72 |
+
+endif ()
|
73 |
+
if (MSVC AND BUILD_NETGEOGRAPHICLIB)
|
74 |
+
if (GEOGRAPHICLIB_PRECISION EQUAL 2)
|
75 |
+
set (NETGEOGRAPHICLIB_LIBRARIES NETGeographicLib)
|
76 |
+
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
|
77 |
+
index fd0669f2..4744e08d 100644
|
78 |
+
--- a/cmake/CMakeLists.txt
|
79 |
+
+++ b/cmake/CMakeLists.txt
|
80 |
+
@@ -56,13 +56,7 @@ export (TARGETS
|
81 |
+
# ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative
|
82 |
+
# path to the root from there. (Note that the whole install tree can
|
83 |
+
# be relocated.)
|
84 |
+
-if (COMMON_INSTALL_PATH)
|
85 |
+
- # Install under lib${LIB_SUFFIX} so that 32-bit and 64-bit packages
|
86 |
+
- # can be installed on a single machine.
|
87 |
+
- set (INSTALL_CMAKE_DIR "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}")
|
88 |
+
-else ()
|
89 |
+
- set (INSTALL_CMAKE_DIR "cmake")
|
90 |
+
-endif ()
|
91 |
+
+set (INSTALL_CMAKE_DIR "share/${PROJECT_NAME_LOWER}")
|
92 |
+
# Find root of install tree relative to INSTALL_CMAKE_DIR
|
93 |
+
file (RELATIVE_PATH PROJECT_ROOT_DIR
|
94 |
+
"${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR}" "${CMAKE_INSTALL_PREFIX}")
|
95 |
+
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
|
96 |
+
index 3fa8ec6a..92c73946 100644
|
97 |
+
--- a/tools/CMakeLists.txt
|
98 |
+
+++ b/tools/CMakeLists.txt
|
99 |
+
@@ -1,7 +1,7 @@
|
100 |
+
# Build the tools...
|
101 |
+
|
102 |
+
# Where to find the *.usage files for the --help option.
|
103 |
+
-include_directories (${PROJECT_BINARY_DIR}/man)
|
104 |
+
+include_directories (${PROJECT_SOURCE_DIR}/man)
|
105 |
+
# Only needed if target_compile_definitions is not supported
|
106 |
+
add_definitions (${PROJECT_DEFINITIONS})
|
107 |
+
|
108 |
+
@@ -16,7 +16,7 @@ foreach (TOOL ${TOOLS})
|
109 |
+
add_dependencies (tools ${TOOL})
|
110 |
+
|
111 |
+
set_source_files_properties (${TOOL}.cpp PROPERTIES
|
112 |
+
- OBJECT_DEPENDS ${PROJECT_BINARY_DIR}/man/${TOOL}.usage)
|
113 |
+
+ OBJECT_DEPENDS ${PROJECT_SOURCE_DIR}/man/${TOOL}.usage)
|
114 |
+
|
115 |
+
target_link_libraries (${TOOL} ${PROJECT_LIBRARIES} ${HIGHPREC_LIBRARIES})
|
116 |
+
|
117 |
+
@@ -31,11 +31,11 @@ endif ()
|
118 |
+
if (APPLE)
|
119 |
+
# Ensure that the package is relocatable
|
120 |
+
set_target_properties (${TOOLS} PROPERTIES
|
121 |
+
- INSTALL_RPATH "@loader_path/../lib${LIB_SUFFIX}")
|
122 |
+
+ INSTALL_RPATH "@loader_path/${PROJECT_LIB_DIR}")
|
123 |
+
endif ()
|
124 |
+
|
125 |
+
# Specify where the tools are installed, adding them to the export targets
|
126 |
+
-install (TARGETS ${TOOLS} EXPORT targets DESTINATION bin)
|
127 |
+
+install (TARGETS ${TOOLS} DESTINATION "${INSTALL_TOOL_DIR}")
|
128 |
+
|
129 |
+
if (MSVC AND PACKAGE_DEBUG_LIBS)
|
130 |
+
# Possibly don't EXPORT the debug versions of the tools and then this
|
131 |
+
@@ -55,7 +55,7 @@ set_property (TARGET tools ${TOOLS} PROPERTY FOLDER tools)
|
132 |
+
# systems. This needs to substitute ${GEOGRAPHICLIB_DATA} as the
|
133 |
+
# default data directory. These are installed under sbin, because it is
|
134 |
+
# expected to be run with write access to /usr/local.
|
135 |
+
-if (NOT WIN32)
|
136 |
+
+if (NOT WIN32 AND FALSE)
|
137 |
+
foreach (SCRIPT ${SCRIPTS})
|
138 |
+
configure_file (${SCRIPT}.sh scripts/${SCRIPT} @ONLY)
|
139 |
+
add_custom_command (OUTPUT ${SCRIPT}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geographiclib/portfile.cmake
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_from_sourceforge (
|
2 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
3 |
+
REPO geographiclib
|
4 |
+
REF distrib
|
5 |
+
FILENAME "GeographicLib-1.52.tar.gz"
|
6 |
+
SHA512 98a4d33764db4a4755851a7db639fd9e055dcf4f1f949258e112fce2e198076b5896fcae2c1ea36b37fe1000d28eec326636a730e70f25bc19a1610423ba6859
|
7 |
+
PATCHES cxx-library-only.patch
|
8 |
+
)
|
9 |
+
|
10 |
+
vcpkg_check_features (
|
11 |
+
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
12 |
+
INVERTED_FEATURES
|
13 |
+
"tools" SKIP_TOOLS
|
14 |
+
)
|
15 |
+
|
16 |
+
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
17 |
+
set (LIB_TYPE "SHARED")
|
18 |
+
else ()
|
19 |
+
set (LIB_TYPE "STATIC")
|
20 |
+
endif ()
|
21 |
+
|
22 |
+
vcpkg_configure_cmake (
|
23 |
+
SOURCE_PATH ${SOURCE_PATH}
|
24 |
+
OPTIONS
|
25 |
+
"-DGEOGRAPHICLIB_LIB_TYPE=${LIB_TYPE}"
|
26 |
+
${FEATURE_OPTIONS}
|
27 |
+
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
28 |
+
)
|
29 |
+
|
30 |
+
vcpkg_install_cmake ()
|
31 |
+
vcpkg_fixup_cmake_targets (CONFIG_PATH share/geographiclib)
|
32 |
+
vcpkg_copy_pdbs ()
|
33 |
+
|
34 |
+
if (tools IN_LIST FEATURES)
|
35 |
+
vcpkg_copy_tool_dependencies (${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
36 |
+
endif ()
|
37 |
+
|
38 |
+
file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
39 |
+
file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
40 |
+
file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
41 |
+
file (INSTALL ${SOURCE_PATH}/LICENSE.txt
|
42 |
+
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
|
43 |
+
RENAME copyright)
|
44 |
+
|
45 |
+
# Install usage
|
46 |
+
configure_file (${CMAKE_CURRENT_LIST_DIR}/usage
|
47 |
+
${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY)
|
48 |
+
|
49 |
+
vcpkg_fixup_pkgconfig()
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geographiclib/usage
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The package @PORT@:@TARGET_TRIPLET@ provides CMake targets:
|
2 |
+
|
3 |
+
find_package (GeographicLib CONFIG REQUIRED)
|
4 |
+
target_link_libraries (main PRIVATE ${GeographicLib_LIBRARIES})
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geographiclib/vcpkg.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "geographiclib",
|
3 |
+
"version": "1.52",
|
4 |
+
"port-version": 2,
|
5 |
+
"description": "GeographicLib, a C++ library for performing geographic conversions",
|
6 |
+
"homepage": "https://geographiclib.sourceforge.io",
|
7 |
+
"features": {
|
8 |
+
"tools": {
|
9 |
+
"description": "The GeographicLib tools",
|
10 |
+
"supports": "!uwp"
|
11 |
+
}
|
12 |
+
}
|
13 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geos/disable-warning-4996.patch
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index accc1a2..34d2055 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -174,7 +174,7 @@ target_compile_features(geos_cxx_flags INTERFACE cxx_std_11)
|
6 |
+
target_compile_options(geos_cxx_flags INTERFACE
|
7 |
+
"$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-ffp-contract=off>"
|
8 |
+
"$<$<CXX_COMPILER_ID:GNU>:-ffp-contract=off>"
|
9 |
+
- "$<$<CXX_COMPILER_ID:MSVC>:/fp:precise>"
|
10 |
+
+ $<$<CXX_COMPILER_ID:MSVC>:/fp:precise /wd4996>
|
11 |
+
)
|
12 |
+
|
13 |
+
# Use -ffloat-store for 32-bit builds (needed to make some tests pass)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geos/fix-exported-config.patch
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
|
2 |
+
index bc0e774..e3ca0bd 100644
|
3 |
+
--- a/tools/CMakeLists.txt
|
4 |
+
+++ b/tools/CMakeLists.txt
|
5 |
+
@@ -45,11 +45,18 @@ function(configure_install_geos_pc)
|
6 |
+
set(includedir "$\{prefix\}/${CMAKE_INSTALL_INCLUDEDIR}")
|
7 |
+
set(libdir "$\{exec_prefix\}/${CMAKE_INSTALL_LIBDIR}")
|
8 |
+
set(VERSION ${GEOS_VERSION})
|
9 |
+
- set(EXTRA_LIBS "-lstdc++")
|
10 |
+
+ if(APPLE OR CMAKE_ANDROID_STL_TYPE MATCHES "^c\\+\\+")
|
11 |
+
+ set(EXTRA_LIBS "-lc++")
|
12 |
+
+ elseif(UNIX OR MINGW)
|
13 |
+
+ set(EXTRA_LIBS "-lstdc++")
|
14 |
+
+ else()
|
15 |
+
+ set(EXTRA_LIBS "")
|
16 |
+
+ endif()
|
17 |
+
if(HAVE_LIBM)
|
18 |
+
list(APPEND EXTRA_LIBS "-lm")
|
19 |
+
endif()
|
20 |
+
list(JOIN EXTRA_LIBS " " EXTRA_LIBS)
|
21 |
+
+ set(EXTRA_LIBS "${EXTRA_LIBS}" PARENT_SCOPE) # for geos-config
|
22 |
+
|
23 |
+
configure_file(
|
24 |
+
${CMAKE_CURRENT_SOURCE_DIR}/geos.pc.in
|
25 |
+
@@ -61,9 +68,9 @@ function(configure_install_geos_pc)
|
26 |
+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
27 |
+
endfunction()
|
28 |
+
|
29 |
+
+configure_install_geos_pc()
|
30 |
+
if(NOT MSVC)
|
31 |
+
configure_install_geos_config()
|
32 |
+
- configure_install_geos_pc()
|
33 |
+
endif()
|
34 |
+
|
35 |
+
option(BUILD_ASTYLE "Build astyle (Artistic Style) tool" OFF)
|
36 |
+
diff --git a/tools/geos-config.in b/tools/geos-config.in
|
37 |
+
index 6eff1eb..8827f6a 100644
|
38 |
+
--- a/tools/geos-config.in
|
39 |
+
+++ b/tools/geos-config.in
|
40 |
+
@@ -1,9 +1,11 @@
|
41 |
+
#!/bin/sh
|
42 |
+
|
43 |
+
-prefix=@prefix@
|
44 |
+
-exec_prefix=@exec_prefix@
|
45 |
+
-includedir=@includedir@
|
46 |
+
-libdir=@libdir@
|
47 |
+
+DIRNAME=$(dirname $0)
|
48 |
+
+TOOLS=$(dirname $DIRNAME)
|
49 |
+
+prefix=$(CDPATH= cd -- "${DIRNAME%/tools/geos/*}" && pwd -P)
|
50 |
+
+exec_prefix=${prefix}
|
51 |
+
+includedir=${prefix}/include
|
52 |
+
+libdir=${prefix}${TOOLS##*/geos}/lib
|
53 |
+
|
54 |
+
usage()
|
55 |
+
{
|
56 |
+
@@ -47,16 +49,16 @@ while test $# -gt 0; do
|
57 |
+
echo -L${libdir} -lgeos-@VERSION_RELEASE@
|
58 |
+
;;
|
59 |
+
--clibs)
|
60 |
+
- echo -L${libdir} -lgeos_c
|
61 |
+
+ echo -L${libdir} -lgeos_c $(if test "@BUILD_SHARED_LIBS@" != "ON"; then echo "-lgeos @EXTRA_LIBS@"; fi)
|
62 |
+
;;
|
63 |
+
--cclibs)
|
64 |
+
- echo -L${libdir} -lgeos
|
65 |
+
+ echo -L${libdir} -lgeos $(if test "@BUILD_SHARED_LIBS@" != "ON"; then echo "@EXTRA_LIBS@"; fi)
|
66 |
+
;;
|
67 |
+
--static-clibs)
|
68 |
+
- echo -L${libdir} -lgeos_c -lgeos -lm
|
69 |
+
+ echo -L${libdir} -lgeos_c -lgeos @EXTRA_LIBS@
|
70 |
+
;;
|
71 |
+
--static-cclibs)
|
72 |
+
- echo -L${libdir} -lgeos -lm
|
73 |
+
+ echo -L${libdir} -lgeos @EXTRA_LIBS@
|
74 |
+
;;
|
75 |
+
--cflags)
|
76 |
+
echo -I${includedir}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geos/install-hpp-files.patch
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index 20c8907..accc1a2 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -367,7 +367,7 @@ install(DIRECTORY
|
6 |
+
"${CMAKE_CURRENT_LIST_DIR}/include/geos"
|
7 |
+
"${CMAKE_CURRENT_BINARY_DIR}/include/geos"
|
8 |
+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
9 |
+
- FILES_MATCHING PATTERN "*.h")
|
10 |
+
+ FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")
|
11 |
+
if(NOT DISABLE_GEOS_INLINE)
|
12 |
+
install(DIRECTORY
|
13 |
+
"${CMAKE_CURRENT_LIST_DIR}/include/geos"
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geos/portfile.cmake
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
set(GEOS_VERSION 3.10.0)
|
2 |
+
|
3 |
+
vcpkg_download_distfile(ARCHIVE
|
4 |
+
URLS "https://download.osgeo.org/geos/geos-${GEOS_VERSION}.tar.bz2"
|
5 |
+
FILENAME "geos-${GEOS_VERSION}.tar.bz2"
|
6 |
+
SHA512 12657c6649bfbf6efa3232a054969c6229bb23fc16a7c72d6ca5fdb662e0d08e14bbcaa6944a17de8972b6c236608d94c870ead0b04fada2d2af3d42c238058e
|
7 |
+
)
|
8 |
+
vcpkg_extract_source_archive_ex(
|
9 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
10 |
+
ARCHIVE "${ARCHIVE}"
|
11 |
+
REF ${GEOS_VERSION}
|
12 |
+
PATCHES
|
13 |
+
disable-warning-4996.patch
|
14 |
+
fix-exported-config.patch
|
15 |
+
install-hpp-files.patch
|
16 |
+
)
|
17 |
+
|
18 |
+
if(VCPKG_TARGET_IS_MINGW)
|
19 |
+
set(_CMAKE_EXTRA_OPTIONS "-DDISABLE_GEOS_INLINE=ON")
|
20 |
+
else()
|
21 |
+
set(_CMAKE_EXTRA_OPTIONS "")
|
22 |
+
endif()
|
23 |
+
|
24 |
+
vcpkg_cmake_configure(
|
25 |
+
SOURCE_PATH "${SOURCE_PATH}"
|
26 |
+
OPTIONS
|
27 |
+
-DBUILD_ASTYLE=OFF
|
28 |
+
-DBUILD_DOCUMENTATION=OFF
|
29 |
+
-DBUILD_GEOSOP=OFF
|
30 |
+
-DBUILD_TESTING=OFF
|
31 |
+
-DBUILD_BENCHMARKS=OFF
|
32 |
+
${_CMAKE_EXTRA_OPTIONS}
|
33 |
+
OPTIONS_DEBUG
|
34 |
+
-DCMAKE_DEBUG_POSTFIX=d # Legacy decision, hard coded in depending ports
|
35 |
+
)
|
36 |
+
vcpkg_cmake_install()
|
37 |
+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/GEOS)
|
38 |
+
vcpkg_fixup_pkgconfig()
|
39 |
+
|
40 |
+
function(geos_add_debug_postfix config_file)
|
41 |
+
file(READ "${config_file}" contents)
|
42 |
+
string(REGEX REPLACE "(-lgeos(_c)?)d?([^-_d])" "\\1d\\3" fixed_contents "${contents}")
|
43 |
+
file(WRITE "${config_file}" "${fixed_contents}")
|
44 |
+
endfunction()
|
45 |
+
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
46 |
+
if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW)
|
47 |
+
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
|
48 |
+
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/geos-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/geos-config")
|
49 |
+
file(CHMOD "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/geos-config" FILE_PERMISSIONS
|
50 |
+
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
51 |
+
GROUP_READ GROUP_EXECUTE
|
52 |
+
WORLD_READ WORLD_EXECUTE
|
53 |
+
)
|
54 |
+
endif()
|
55 |
+
endif()
|
56 |
+
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
57 |
+
geos_add_debug_postfix("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/geos.pc")
|
58 |
+
if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW)
|
59 |
+
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin")
|
60 |
+
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/geos-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/geos-config")
|
61 |
+
geos_add_debug_postfix("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/geos-config")
|
62 |
+
file(CHMOD "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/geos-config" FILE_PERMISSIONS
|
63 |
+
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
64 |
+
GROUP_READ GROUP_EXECUTE
|
65 |
+
WORLD_READ WORLD_EXECUTE
|
66 |
+
)
|
67 |
+
endif()
|
68 |
+
endif()
|
69 |
+
|
70 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
71 |
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS)
|
72 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
73 |
+
endif()
|
74 |
+
|
75 |
+
# Handle copyright
|
76 |
+
configure_file("${SOURCE_PATH}/COPYING" "${CURRENT_PACKAGES_DIR}/share/geos/copyright" COPYONLY)
|
77 |
+
|
78 |
+
vcpkg_copy_pdbs()
|
79 |
+
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geos/usage
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The package geos provides CMake targets:
|
2 |
+
|
3 |
+
# C API (provides long-term ABI stability)
|
4 |
+
find_package(GEOS CONFIG REQUIRED)
|
5 |
+
target_link_libraries(main PRIVATE GEOS::geos_c)
|
6 |
+
|
7 |
+
# C++ API (will likely change across versions)
|
8 |
+
find_package(GEOS CONFIG REQUIRED)
|
9 |
+
target_link_libraries(main PRIVATE GEOS::geos)
|
10 |
+
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geos/vcpkg.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "geos",
|
3 |
+
"version": "3.10.0",
|
4 |
+
"description": "Geometry Engine Open Source",
|
5 |
+
"homepage": "https://www.osgeo.org/projects/geos/",
|
6 |
+
"dependencies": [
|
7 |
+
{
|
8 |
+
"name": "vcpkg-cmake",
|
9 |
+
"host": true
|
10 |
+
},
|
11 |
+
{
|
12 |
+
"name": "vcpkg-cmake-config",
|
13 |
+
"host": true
|
14 |
+
}
|
15 |
+
]
|
16 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geotrans/CMakeLists.txt
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
cmake_minimum_required(VERSION 3.10)
|
2 |
+
project(geotrans CXX)
|
3 |
+
|
4 |
+
file(GLOB_RECURSE DTCC_CPP CCS/src/dtcc/*.cpp)
|
5 |
+
include_directories(
|
6 |
+
CCS/src/CoordinateConversion
|
7 |
+
CCS/src/dtcc
|
8 |
+
CCS/src/dtcc/CoordinateSystemParameters
|
9 |
+
CCS/src/dtcc/CoordinateSystems
|
10 |
+
CCS/src/dtcc/CoordinateSystems/albers
|
11 |
+
CCS/src/dtcc/CoordinateSystems/azeq
|
12 |
+
CCS/src/dtcc/CoordinateSystems/bng
|
13 |
+
CCS/src/dtcc/CoordinateSystems/bonne
|
14 |
+
CCS/src/dtcc/CoordinateSystems/cassini
|
15 |
+
CCS/src/dtcc/CoordinateSystems/cyleqa
|
16 |
+
CCS/src/dtcc/CoordinateSystems/datum
|
17 |
+
CCS/src/dtcc/CoordinateSystems/eckert4
|
18 |
+
CCS/src/dtcc/CoordinateSystems/eckert6
|
19 |
+
CCS/src/dtcc/CoordinateSystems/ellipse
|
20 |
+
CCS/src/dtcc/CoordinateSystems/eqdcyl
|
21 |
+
CCS/src/dtcc/CoordinateSystems/gars
|
22 |
+
CCS/src/dtcc/CoordinateSystems/geocent
|
23 |
+
CCS/src/dtcc/CoordinateSystems/georef
|
24 |
+
CCS/src/dtcc/CoordinateSystems/gnomonic
|
25 |
+
CCS/src/dtcc/CoordinateSystems/grinten
|
26 |
+
CCS/src/dtcc/CoordinateSystems/lambert
|
27 |
+
CCS/src/dtcc/CoordinateSystems/loccart
|
28 |
+
CCS/src/dtcc/CoordinateSystems/locspher
|
29 |
+
CCS/src/dtcc/CoordinateSystems/mercator
|
30 |
+
CCS/src/dtcc/CoordinateSystems/mgrs
|
31 |
+
CCS/src/dtcc/CoordinateSystems/miller
|
32 |
+
CCS/src/dtcc/CoordinateSystems/misc
|
33 |
+
CCS/src/dtcc/CoordinateSystems/mollweid
|
34 |
+
CCS/src/dtcc/CoordinateSystems/neys
|
35 |
+
CCS/src/dtcc/CoordinateSystems/nzmg
|
36 |
+
CCS/src/dtcc/CoordinateSystems/omerc
|
37 |
+
CCS/src/dtcc/CoordinateSystems/orthogr
|
38 |
+
CCS/src/dtcc/CoordinateSystems/polarst
|
39 |
+
CCS/src/dtcc/CoordinateSystems/polycon
|
40 |
+
CCS/src/dtcc/CoordinateSystems/sinusoid
|
41 |
+
CCS/src/dtcc/CoordinateSystems/spherical
|
42 |
+
CCS/src/dtcc/CoordinateSystems/stereogr
|
43 |
+
CCS/src/dtcc/CoordinateSystems/threads
|
44 |
+
CCS/src/dtcc/CoordinateSystems/tranmerc
|
45 |
+
CCS/src/dtcc/CoordinateSystems/trcyleqa
|
46 |
+
CCS/src/dtcc/CoordinateSystems/ups
|
47 |
+
CCS/src/dtcc/CoordinateSystems/usng
|
48 |
+
CCS/src/dtcc/CoordinateSystems/utm
|
49 |
+
CCS/src/dtcc/CoordinateSystems/webmerc
|
50 |
+
CCS/src/dtcc/CoordinateTuples
|
51 |
+
CCS/src/dtcc/Enumerations
|
52 |
+
CCS/src/dtcc/Exception
|
53 |
+
)
|
54 |
+
set(DTCC_INCLUDES
|
55 |
+
include/CoordinateConversion
|
56 |
+
include/dtcc/
|
57 |
+
include/dtcc/CoordinateSystemParameters
|
58 |
+
include/dtcc/CoordinateSystems
|
59 |
+
include/dtcc/CoordinateSystems/albers
|
60 |
+
include/dtcc/CoordinateSystems/azeq
|
61 |
+
include/dtcc/CoordinateSystems/bng
|
62 |
+
include/dtcc/CoordinateSystems/bonne
|
63 |
+
include/dtcc/CoordinateSystems/cassini
|
64 |
+
include/dtcc/CoordinateSystems/cyleqa
|
65 |
+
include/dtcc/CoordinateSystems/datum
|
66 |
+
include/dtcc/CoordinateSystems/eckert4
|
67 |
+
include/dtcc/CoordinateSystems/eckert6
|
68 |
+
include/dtcc/CoordinateSystems/ellipse
|
69 |
+
include/dtcc/CoordinateSystems/eqdcyl
|
70 |
+
include/dtcc/CoordinateSystems/gars
|
71 |
+
include/dtcc/CoordinateSystems/geocent
|
72 |
+
include/dtcc/CoordinateSystems/georef
|
73 |
+
include/dtcc/CoordinateSystems/gnomonic
|
74 |
+
include/dtcc/CoordinateSystems/grinten
|
75 |
+
include/dtcc/CoordinateSystems/lambert
|
76 |
+
include/dtcc/CoordinateSystems/loccart
|
77 |
+
include/dtcc/CoordinateSystems/locspher
|
78 |
+
include/dtcc/CoordinateSystems/mercator
|
79 |
+
include/dtcc/CoordinateSystems/mgrs
|
80 |
+
include/dtcc/CoordinateSystems/miller
|
81 |
+
include/dtcc/CoordinateSystems/misc
|
82 |
+
include/dtcc/CoordinateSystems/mollweid
|
83 |
+
include/dtcc/CoordinateSystems/neys
|
84 |
+
include/dtcc/CoordinateSystems/nzmg
|
85 |
+
include/dtcc/CoordinateSystems/omerc
|
86 |
+
include/dtcc/CoordinateSystems/orthogr
|
87 |
+
include/dtcc/CoordinateSystems/polarst
|
88 |
+
include/dtcc/CoordinateSystems/polycon
|
89 |
+
include/dtcc/CoordinateSystems/sinusoid
|
90 |
+
include/dtcc/CoordinateSystems/spherical
|
91 |
+
include/dtcc/CoordinateSystems/stereogr
|
92 |
+
include/dtcc/CoordinateSystems/threads
|
93 |
+
include/dtcc/CoordinateSystems/tranmerc
|
94 |
+
include/dtcc/CoordinateSystems/trcyleqa
|
95 |
+
include/dtcc/CoordinateSystems/ups
|
96 |
+
include/dtcc/CoordinateSystems/usng
|
97 |
+
include/dtcc/CoordinateSystems/utm
|
98 |
+
include/dtcc/CoordinateSystems/webmerc
|
99 |
+
include/dtcc/CoordinateTuples
|
100 |
+
include/dtcc/Enumerations
|
101 |
+
include/dtcc/Exception
|
102 |
+
)
|
103 |
+
|
104 |
+
if(WIN32)
|
105 |
+
add_definitions(-DLITTLE_ENDIAN)
|
106 |
+
endif()
|
107 |
+
|
108 |
+
add_library(MSPdtcc ${DTCC_CPP})
|
109 |
+
add_library(MSPCoordinateConversionService CCS/src/CoordinateConversion/CoordinateConversionService.cpp ${DTCC_CPP})
|
110 |
+
|
111 |
+
target_include_directories(MSPdtcc INTERFACE "$<INSTALL_INTERFACE:${DTCC_INCLUDES}>")
|
112 |
+
target_include_directories(MSPCoordinateConversionService INTERFACE $<INSTALL_INTERFACE:include/CoordinateConversion>)
|
113 |
+
|
114 |
+
if(WIN32)
|
115 |
+
if (BUILD_SHARED_LIBS)
|
116 |
+
add_definitions(
|
117 |
+
-DMSP_CCS_EXPORTS
|
118 |
+
-D_USRDLL
|
119 |
+
)
|
120 |
+
endif()
|
121 |
+
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
122 |
+
else()
|
123 |
+
find_package(Threads REQUIRED)
|
124 |
+
target_link_libraries(MSPdtcc PRIVATE Threads::Threads ${CMAKE_DL_LIBS})
|
125 |
+
endif()
|
126 |
+
|
127 |
+
|
128 |
+
install(
|
129 |
+
TARGETS MSPdtcc
|
130 |
+
EXPORT geotrans
|
131 |
+
RUNTIME DESTINATION bin
|
132 |
+
LIBRARY DESTINATION lib
|
133 |
+
ARCHIVE DESTINATION lib
|
134 |
+
)
|
135 |
+
|
136 |
+
install(
|
137 |
+
TARGETS MSPCoordinateConversionService
|
138 |
+
EXPORT geotrans
|
139 |
+
RUNTIME DESTINATION bin
|
140 |
+
LIBRARY DESTINATION lib
|
141 |
+
ARCHIVE DESTINATION lib
|
142 |
+
)
|
143 |
+
|
144 |
+
install(DIRECTORY "${CMAKE_SOURCE_DIR}/CCS/src/"
|
145 |
+
DESTINATION "include"
|
146 |
+
CONFIGURATIONS Release
|
147 |
+
FILES_MATCHING
|
148 |
+
PATTERN "*.h"
|
149 |
+
)
|
150 |
+
|
151 |
+
install(EXPORT geotrans NAMESPACE geotrans:: DESTINATION share/geotrans CONFIGURATIONS Release)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geotrans/geotrans-config.in.cmake
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32)
|
3 |
+
include(CMakeFindDependencyMacro)
|
4 |
+
find_dependency(Threads)
|
5 |
+
endif()
|
6 |
+
|
7 |
+
include(${CMAKE_CURRENT_LIST_DIR}/geotrans.cmake)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geotrans/portfile.cmake
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
set(VCPKG_LIBRARY_LINKAGE "dynamic")
|
2 |
+
|
3 |
+
# We specify the Linux URL, but the only difference between the Windows/Linux packages are the included libraries
|
4 |
+
# which we re-build anyway. There is no source only package provided or it would be preferred (and smaller).
|
5 |
+
vcpkg_download_distfile(ARCHIVE
|
6 |
+
URLS "https://earth-info.nga.mil/php/download.php?file=wgs-mastertgz"
|
7 |
+
FILENAME "geotrans-3.8-master.tgz"
|
8 |
+
SHA512 359704ee9700762111006d126872feab9f644af0cebd433a657473347ea48f4eb172681f5f564fbca171bbf58fe0e8fb0829597403958770b7d22ad380afeac3
|
9 |
+
)
|
10 |
+
|
11 |
+
vcpkg_extract_source_archive_ex(
|
12 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
13 |
+
ARCHIVE ${ARCHIVE}
|
14 |
+
)
|
15 |
+
|
16 |
+
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
17 |
+
|
18 |
+
vcpkg_configure_cmake(
|
19 |
+
SOURCE_PATH ${SOURCE_PATH}
|
20 |
+
PREFER_NINJA
|
21 |
+
)
|
22 |
+
|
23 |
+
vcpkg_install_cmake()
|
24 |
+
|
25 |
+
configure_file(
|
26 |
+
${CMAKE_CURRENT_LIST_DIR}/geotrans-config.in.cmake
|
27 |
+
${CURRENT_PACKAGES_DIR}/share/${PORT}/geotrans-config.cmake
|
28 |
+
@ONLY
|
29 |
+
)
|
30 |
+
|
31 |
+
configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT} @ONLY)
|
32 |
+
|
33 |
+
# Handle copyright
|
34 |
+
file(INSTALL ${SOURCE_PATH}/GEOTRANS3/docs/MSP_Geotrans_Terms_Of_Use.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
35 |
+
|
36 |
+
# Install the geo model data
|
37 |
+
file(COPY ${SOURCE_PATH}/data DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geotrans/usage
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The package geotrans provides CMake targets:
|
2 |
+
|
3 |
+
find_package(geotrans CONFIG REQUIRED)
|
4 |
+
target_link_libraries(main PRIVATE geotrans::MSPdtcc geotrans::MSPCoordinateConversionService)
|
5 |
+
|
6 |
+
|
7 |
+
The geotrans library depends on being able to read it's model data so you'll need to
|
8 |
+
set an environment variable to let geotrans know where the models are installed:
|
9 |
+
|
10 |
+
export MSPCCS_DATA=@CURRENT_INSTALLED_DIR@/share/@PORT@/data
|
11 |
+
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/geotrans/vcpkg.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "geotrans",
|
3 |
+
"version": "3.8",
|
4 |
+
"port-version": 1,
|
5 |
+
"description": "GEOTRANS is an application that allows you to convert geographic coordinates among a wide variety of coordinate systems, map projections, grids, and datums. GEOTRANS runs in Microsoft Windows and LINUX environments.",
|
6 |
+
"homepage": "https://earth-info.nga.mil/GandG/update/index.php?action=home",
|
7 |
+
"supports": "!uwp"
|
8 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/getdns/disable-docs.patch
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index 413709da..d3dd03f0 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -1039,9 +1039,9 @@ configure_file(src/version.c.in version.c)
|
6 |
+
|
7 |
+
set(version ${PACKAGE_VERSION})
|
8 |
+
set(date ${API_VERSION})
|
9 |
+
-file(GLOB mans doc/*.3.in)
|
10 |
+
-file(MAKE_DIRECTORY man3)
|
11 |
+
-foreach (man ${mans})
|
12 |
+
+#file(GLOB mans doc/*.3.in)
|
13 |
+
+#file(MAKE_DIRECTORY man3)
|
14 |
+
+if (FALSE)
|
15 |
+
get_filename_component(out ${man} NAME_WE)
|
16 |
+
configure_file(${man} man3/${out}.3 @ONLY)
|
17 |
+
|
18 |
+
@@ -1061,7 +1061,7 @@ foreach (man ${mans})
|
19 |
+
configure_file(${man} man3/${alt}.3 @ONLY)
|
20 |
+
endif ()
|
21 |
+
endforeach()
|
22 |
+
-endforeach()
|
23 |
+
+endif()
|
24 |
+
|
25 |
+
set(prefix ${CMAKE_INSTALL_PREFIX})
|
26 |
+
configure_file(getdns.pc.in getdns.pc @ONLY)
|
27 |
+
@@ -1099,11 +1099,11 @@ if (BUILD_GETDNS_SERVER_MON)
|
28 |
+
endif ()
|
29 |
+
|
30 |
+
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/getdns DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
31 |
+
-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man3 DESTINATION share/man)
|
32 |
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man3 DESTINATION share/man)
|
33 |
+
|
34 |
+
-set(docdir share/doc/getdns)
|
35 |
+
-install(FILES AUTHORS ChangeLog COPYING LICENSE NEWS README.md DESTINATION ${docdir})
|
36 |
+
-install(FILES spec/index.html DESTINATION ${docdir}/spec)
|
37 |
+
+#set(docdir share/doc/getdns)
|
38 |
+
+#install(FILES AUTHORS ChangeLog COPYING LICENSE NEWS README.md DESTINATION ${docdir})
|
39 |
+
+#install(FILES spec/index.html DESTINATION ${docdir}/spec)
|
40 |
+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/getdns.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
41 |
+
|
42 |
+
install(CODE "message(\"\
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/getdns/portfile.cmake
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
set(GETDNS_VERSION 1.7.0)
|
2 |
+
set(GETDNS_HASH d09b8bdd0b4a3df2d25b9689166226da83a5a7eb2c7436487dc637539ac6077624a4d66cf684c4e6c4911561872c6bd191af3afd90d275b1662e4c6c47773ef6)
|
3 |
+
|
4 |
+
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" GETDNS_ENABLE_STATIC)
|
5 |
+
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" GETDNS_ENABLE_SHARED)
|
6 |
+
|
7 |
+
vcpkg_download_distfile(ARCHIVE
|
8 |
+
URLS "https://getdnsapi.net/dist/getdns-${GETDNS_VERSION}.tar.gz"
|
9 |
+
FILENAME "getdns-${GETDNS_VERSION}.tar.gz"
|
10 |
+
SHA512 ${GETDNS_HASH}
|
11 |
+
)
|
12 |
+
|
13 |
+
vcpkg_extract_source_archive(
|
14 |
+
SOURCE_PATH
|
15 |
+
ARCHIVE "${ARCHIVE}"
|
16 |
+
PATCHES disable-docs.patch
|
17 |
+
)
|
18 |
+
|
19 |
+
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
20 |
+
set(VCPKG_CXX_FLAGS "/D_CRT_DECLARE_NONSTDC_NAMES ${VCPKG_CXX_FLAGS}")
|
21 |
+
set(VCPKG_C_FLAGS "/D_CRT_DECLARE_NONSTDC_NAMES ${VCPKG_C_FLAGS}")
|
22 |
+
endif()
|
23 |
+
|
24 |
+
vcpkg_check_features(
|
25 |
+
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
26 |
+
FEATURES
|
27 |
+
libevent BUILD_LIBEVENT2
|
28 |
+
libuv BUILD_LIBUV
|
29 |
+
)
|
30 |
+
|
31 |
+
vcpkg_cmake_configure(
|
32 |
+
SOURCE_PATH "${SOURCE_PATH}"
|
33 |
+
DISABLE_PARALLEL_CONFIGURE
|
34 |
+
OPTIONS
|
35 |
+
-DBUILD_GETDNS_QUERY=OFF
|
36 |
+
-DBUILD_GETDNS_SERVER_MON=OFF
|
37 |
+
-DENABLE_STATIC=${GETDNS_ENABLE_STATIC}
|
38 |
+
-DENABLE_SHARED=${GETDNS_ENABLE_SHARED}
|
39 |
+
${FEATURE_OPTIONS}
|
40 |
+
-DBUILD_TESTING=OFF
|
41 |
+
-DENABLE_STUB_ONLY=ON #if setting ON, it will require libunbound to build on Unix platform.
|
42 |
+
)
|
43 |
+
vcpkg_cmake_install()
|
44 |
+
|
45 |
+
vcpkg_copy_pdbs()
|
46 |
+
|
47 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
48 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
49 |
+
|
50 |
+
vcpkg_fixup_pkgconfig()
|
51 |
+
|
52 |
+
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/getdns/vcpkg.json
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "getdns",
|
3 |
+
"version": "1.7.0",
|
4 |
+
"port-version": 3,
|
5 |
+
"description": "GetDNS is a modern asynchronous DNS API",
|
6 |
+
"homepage": "https://getdnsapi.net/",
|
7 |
+
"license": "BSD-3-Clause",
|
8 |
+
"supports": "!uwp",
|
9 |
+
"dependencies": [
|
10 |
+
"libidn2",
|
11 |
+
"openssl",
|
12 |
+
{
|
13 |
+
"name": "vcpkg-cmake",
|
14 |
+
"host": true
|
15 |
+
}
|
16 |
+
],
|
17 |
+
"features": {
|
18 |
+
"libevent": {
|
19 |
+
"description": "libevent event loop integration",
|
20 |
+
"dependencies": [
|
21 |
+
"libevent"
|
22 |
+
]
|
23 |
+
},
|
24 |
+
"libuv": {
|
25 |
+
"description": "libuv event loop integration",
|
26 |
+
"dependencies": [
|
27 |
+
"libuv"
|
28 |
+
]
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/getopt-win32/getopt.h.patch
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
commit 81c35ed14e07138e44b5b30f52fbc2bb26ae1fed
|
2 |
+
Author: Max Khon <[email protected]>
|
3 |
+
Date: Mon Jan 24 23:05:24 2022 +0700
|
4 |
+
|
5 |
+
Rename "extern C" macros as MS VC C++ headers use _END_EXTERN_C macro
|
6 |
+
|
7 |
+
diff --git a/getopt.h b/getopt.h
|
8 |
+
index 5ed4a46..5e33682 100644
|
9 |
+
--- a/getopt.h
|
10 |
+
+++ b/getopt.h
|
11 |
+
@@ -57,12 +57,12 @@ EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
12 |
+
|
13 |
+
// Change behavior for C\C++
|
14 |
+
#ifdef __cplusplus
|
15 |
+
- #define _BEGIN_EXTERN_C extern "C" {
|
16 |
+
- #define _END_EXTERN_C }
|
17 |
+
+ #define _GETOPT_BEGIN_EXTERN_C extern "C" {
|
18 |
+
+ #define _GETOPT_END_EXTERN_C }
|
19 |
+
#define _GETOPT_THROW throw()
|
20 |
+
#else
|
21 |
+
- #define _BEGIN_EXTERN_C
|
22 |
+
- #define _END_EXTERN_C
|
23 |
+
+ #define _GETOPT_BEGIN_EXTERN_C
|
24 |
+
+ #define _GETOPT_END_EXTERN_C
|
25 |
+
#define _GETOPT_THROW
|
26 |
+
#endif
|
27 |
+
|
28 |
+
@@ -81,7 +81,7 @@ EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
29 |
+
#include <string.h>
|
30 |
+
#include <wchar.h>
|
31 |
+
|
32 |
+
-_BEGIN_EXTERN_C
|
33 |
+
+_GETOPT_BEGIN_EXTERN_C
|
34 |
+
|
35 |
+
extern _GETOPT_API int optind;
|
36 |
+
extern _GETOPT_API int opterr;
|
37 |
+
@@ -113,10 +113,10 @@ _BEGIN_EXTERN_C
|
38 |
+
extern _GETOPT_API int getopt_long_w(int argc, wchar_t *const *argv, const wchar_t *options, const struct option_w *long_options, int *opt_index) _GETOPT_THROW;
|
39 |
+
extern _GETOPT_API int getopt_long_only_w(int argc, wchar_t *const *argv, const wchar_t *options, const struct option_w *long_options, int *opt_index) _GETOPT_THROW;
|
40 |
+
|
41 |
+
-_END_EXTERN_C
|
42 |
+
+_GETOPT_END_EXTERN_C
|
43 |
+
|
44 |
+
- #undef _BEGIN_EXTERN_C
|
45 |
+
- #undef _END_EXTERN_C
|
46 |
+
+ #undef _GETOPT_BEGIN_EXTERN_C
|
47 |
+
+ #undef _GETOPT_END_EXTERN_C
|
48 |
+
#undef _GETOPT_THROW
|
49 |
+
#undef _GETOPT_API
|
50 |
+
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/getopt-win32/portfile.cmake
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
if(VCPKG_CMAKE_SYSTEM_NAME)
|
2 |
+
message(FATAL_ERROR "getopt-win32 only supports building on Windows Desktop")
|
3 |
+
endif()
|
4 |
+
|
5 |
+
vcpkg_from_github(
|
6 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
7 |
+
REPO libimobiledevice-win32/getopt
|
8 |
+
REF 0.1
|
9 |
+
SHA512 40e2a901241a5d751cec741e5de423c8f19b105572c7cae18adb6e69be0b408efc6c9a2ecaeb62f117745eac0d093f30d6b91d88c1a27e1f7be91f0e84fdf199
|
10 |
+
HEAD_REF master
|
11 |
+
PATCHES getopt.h.patch
|
12 |
+
)
|
13 |
+
|
14 |
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
15 |
+
list(APPEND OPTIONS "/p:ConfigurationType=StaticLibrary")
|
16 |
+
else()
|
17 |
+
list(APPEND OPTIONS "/p:ConfigurationType=DynamicLibrary")
|
18 |
+
endif()
|
19 |
+
|
20 |
+
set(_file "${SOURCE_PATH}/getopt.vcxproj")
|
21 |
+
file(READ "${_file}" _contents)
|
22 |
+
if(VCPKG_CRT_LINKAGE STREQUAL static)
|
23 |
+
string(REPLACE "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>" "<RuntimeLibrary>MultiThreaded</RuntimeLibrary>" _contents "${_contents}")
|
24 |
+
string(REPLACE "<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>" "<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>" _contents "${_contents}")
|
25 |
+
else()
|
26 |
+
string(REPLACE "<RuntimeLibrary>MultiThreaded</RuntimeLibrary>" "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>" _contents "${_contents}")
|
27 |
+
string(REPLACE "<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>" "<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>" _contents "${_contents}")
|
28 |
+
endif()
|
29 |
+
file(WRITE "${_file}" "${_contents}")
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
vcpkg_install_msbuild(
|
34 |
+
SOURCE_PATH ${SOURCE_PATH}
|
35 |
+
PROJECT_SUBPATH getopt.vcxproj
|
36 |
+
LICENSE_SUBPATH LICENSE
|
37 |
+
OPTIONS ${OPTIONS}
|
38 |
+
)
|
39 |
+
|
40 |
+
# Copy header
|
41 |
+
file(COPY "${SOURCE_PATH}/getopt.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/")
|
42 |
+
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
43 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/getopt.h"
|
44 |
+
" #define __GETOPT_H_" " #define __GETOPT_H_\n #define STATIC_GETOPT"
|
45 |
+
)
|
46 |
+
endif()
|
47 |
+
|
48 |
+
set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/getopt-win32/vcpkg.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "getopt-win32",
|
3 |
+
"version-string": "0.1",
|
4 |
+
"port-version": 2,
|
5 |
+
"description": "An implementation of getopt.",
|
6 |
+
"homepage": "https://github.com/libimobiledevice-win32",
|
7 |
+
"license": "LGPL-3.0-only",
|
8 |
+
"supports": "windows"
|
9 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/getopt/portfile.cmake
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
2 |
+
message(FATAL_ERROR "No implementation of getopt is currently available for UWP targets")
|
3 |
+
endif()
|
4 |
+
|
5 |
+
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/getopt/vcpkg.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "getopt",
|
3 |
+
"version-string": "0",
|
4 |
+
"port-version": 1,
|
5 |
+
"description": "The getopt and getopt_long functions automate some of the chore involved in parsing typical unix command line options.",
|
6 |
+
"supports": "!uwp",
|
7 |
+
"dependencies": [
|
8 |
+
{
|
9 |
+
"name": "getopt-win32",
|
10 |
+
"platform": "windows"
|
11 |
+
}
|
12 |
+
]
|
13 |
+
}
|