This provides a script to build the libosmium examples such as osmium_convert (to convert from xml to pbf). I initially tried a CMake ExternalProject setup, but this was more complicated than I initially thought; this is the more elegant solution. The goal is to eventually rip out osmosis, so that we no longer depend on java for the cucumber tests. References: - https://github.com/Project-OSRM/osrm-backend/issues/1788
16 lines
506 B
Bash
Executable File
16 lines
506 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Builds command line tools shipped with libosmium for example osmium_convert
|
|
# CMake build directory is build/osmium; binaries are located under build/osmium/examples
|
|
|
|
|
|
# e: exit on first error, x: print commands
|
|
set -ex
|
|
|
|
BUILD_DIR=build/osmium
|
|
|
|
cmake -E remove_directory $BUILD_DIR
|
|
cmake -E make_directory $BUILD_DIR
|
|
cmake -E chdir $BUILD_DIR cmake ../../third_party/libosmium -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=1 -DBUILD_TESTING=0
|
|
cmake -E chdir $BUILD_DIR cmake --build .
|