Build and link
GeoDataSDK needs a C++17 compiler, CMake, GDAL, libtiff, SpatiaLite and SQLite3, and libcurl.
Install the dependencies
On macOS with Homebrew, use the full SQLite3 build:
1
brew install sqlite gdal
Debian 13 is the CI image. On Debian:
1
sudo apt install build-essential cmake \
2
libgdal-dev libspatialite-dev libsqlite3-dev \
3
libgeos-dev libproj-dev libtiff-dev \
4
libcurl4-openssl-dev libreadosm-dev \
5
pkg-config
Build
1
cmake --preset release
2
cmake --build --preset release
Libraries are shared by default. Pass -DBUILD_SHARED_LIBS=OFF for static ones.
Link
1
find_package(GDAL REQUIRED)
2
find_package(GeoDataEnc 0.3 REQUIRED)
3
find_package(GeoDataChart 0.3 REQUIRED)
4
5
target_link_libraries(app PRIVATE GeoData::GeoDataEnc GeoData::GeoDataChart GDAL::GDAL)
find_package(GeoDataEnc 0.3) accepts 0.3.x only.
Next