Skip to content

Commit 293ce71

Browse files
committed
Utilities: Add GDAL
1 parent 326d163 commit 293ce71

File tree

5 files changed

+72
-1
lines changed

5 files changed

+72
-1
lines changed

src/Utilities/Shape/CMakeLists.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
target_sources(${CMAKE_PROJECT_NAME}
22
PRIVATE
3+
GDALHelper.cc
4+
GDALHelper.h
35
KMLDomDocument.cc
46
KMLDomDocument.h
57
KMLHelper.cc
@@ -25,3 +27,33 @@ CPMAddPackage(
2527
)
2628

2729
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE shp)
30+
31+
#===========================================================================#
32+
33+
# CPMAddPackage(
34+
# NAME PROJ
35+
# VERSION 9.6.0
36+
# GITHUB_REPOSITORY OSGeo/PROJ
37+
# GIT_TAG 9.6.0
38+
# OPTIONS
39+
# "BUILD_EXAMPLES OFF"
40+
# "BUILD_SHARED_LIBS OFF"
41+
# "BUILD_TESTING OFF"
42+
# )
43+
44+
CPMAddPackage(
45+
NAME GDAL
46+
GITHUB_REPOSITORY OSGeo/gdal
47+
VERSION 3.11.1
48+
OPTIONS
49+
"BUILD_APPS OFF"
50+
"BUILD_SHARED_LIBS OFF"
51+
"BUILD_TESTING OFF"
52+
"GDAL_BUILD_OPTIONAL_DRIVERS OFF"
53+
"OGR_BUILD_OPTIONAL_DRIVERS OFF"
54+
"GDAL_USE_HDFS OFF"
55+
"CMAKE_DISABLE_FIND_PACKAGE_HDFS ON"
56+
"GDAL_USE_ZLIB_INTERNAL ON"
57+
)
58+
59+
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE GDAL::GDAL)

src/Utilities/Shape/GDALHelper.cc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/****************************************************************************
2+
*
3+
* (c) 2009-2024 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4+
*
5+
* QGroundControl is licensed according to the terms in the file
6+
* COPYING.md in the root of the source code directory.
7+
*
8+
****************************************************************************/
9+
10+
#include "GDALHelper.h"
11+
12+
#include "gdal/gdal.h"
13+
14+
namespace GDALHelper
15+
{
16+
17+
}

src/Utilities/Shape/GDALHelper.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/****************************************************************************
2+
*
3+
* (c) 2009-2024 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4+
*
5+
* QGroundControl is licensed according to the terms in the file
6+
* COPYING.md in the root of the source code directory.
7+
*
8+
****************************************************************************/
9+
10+
#pragma once
11+
12+
namespace GDALHelper
13+
{
14+
15+
}

tools/setup/install-dependencies-debian.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,13 @@ if apt-cache show gstreamer1.0-qt6 >/dev/null 2>&1; then
110110
apt-get install -y -qq --no-install-recommends gstreamer1.0-qt6
111111
fi
112112

113+
# --------------------------------------------------------------------
114+
# GDAL
115+
# --------------------------------------------------------------------
116+
apt-get install -y -qq --no-install-recommends \
117+
libproj-dev \
118+
proj-bin
119+
113120
# --------------------------------------------------------------------
114121
# Clean‑up
115122
# --------------------------------------------------------------------

tools/setup/install-dependencies-osx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ then
88
fi
99

1010
brew update
11-
brew install cmake ninja ccache git pkgconf create-dmg mold
11+
brew install cmake ninja ccache git pkgconf create-dmg mold proj
1212

1313
# Install GStreamer
1414
GST_URL=https://gstreamer.freedesktop.org/data/pkg/osx

0 commit comments

Comments
 (0)