Build osmium_convert in order to be able to eventually replace osmosis

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
This commit is contained in:
Daniel J. Hofmann
2016-01-11 12:03:01 +01:00
committed by Patrick Niklaus
parent 466251287f
commit 3727637145
2 changed files with 16 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/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 .