Creating and installing a .cmake file that simplifies locating
this library from within a project that uses CMake.
To make use of this .cmake file, the .cmake file must be loaded
in a CMakeLists.txt file, for example through
find_package(Osmpbf REQUIRED)
Then two variables will be available:
OSMPBF_INCLUDE_DIRS
OSMPBF_LIBRARIES
The former variable can be used in a 'include_directories'
statement, the latter one in a 'target_link_libraries' statement.
The osmpbf (1.3.3-1) build for Debian failed on the mipsel architecture.
The Debian package uses parallel builds which caused the following failure:
```
protoc --proto_path=. --cpp_out=. fileformat.proto
protoc --proto_path=. --cpp_out=. osmformat.proto
cp *.pb.h ../include/osmpbf/
cp *.pb.h ../include/osmpbf/
g++ -g -O2 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wall -Wextra -pedantic -Wredundant-decls -Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wno-long-long -fPIC -c -o osmformat.pb.o osmformat.pb.cc
cp: cannot create regular file '../include/osmpbf/fileformat.pb.h': File exists
```
This change fixes the race condition by copying the header files separately,
instead of copying both header files twice.
With this patch applied, the builds succeeded on all architectures where
OpenJDK 7 is available.
Origin: http://anonscm.debian.org/gitweb/?p=pkg-grass/osmpbf.git;a=commitdiff;h=adcf891b95609e375130438dc431e96017bbbbf8
This brings the debian build more in line with the actual released debian
packages which split up the program into three packages.
The tools Makefile has more warnings enabled.
The README goes into a bit more detail.
These pragmas are used by the IWYU (Include-What-You-Use) program to find out
which header files need to be included in your C/C++ program. The pragmas
added tell IWYU that osmpbf.h acts as a "facade" for the other header files.
You can't initialize strings in header files, because they might be included from several source files and the linker will see several copies of the same string.
When run as root, files will be 'root:root' anyway. When run as user
changing user:group will fail. Furthermore, the group 'root' is not
available on all systems.