# Set prefix path to include required libraries from easybuild paths
diff -ru osm2pgsql-0.92.0/CMakeLists.txt osm2pgsql-0.92.0_patched/CMakeLists.txt
--- osm2pgsql-0.92.0/CMakeLists.txt	2016-12-16 10:43:19.000000000 +0100
+++ osm2pgsql-0.92.0_patched/CMakeLists.txt	2017-03-13 15:33:11.939403214 +0100
@@ -6,6 +6,8 @@
 
 project(osm2pgsql)
 
+set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};$ENV{EBROOTGEOS};$ENV{EBROOTPROJ_4};$ENV{EBROOTLUA};$ENV{EBROOTZLIB};$ENV{EBROOTBOOST};$ENV{EBROOTEXPATH}")
+
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 
 set(DATA_DIR \"${CMAKE_INSTALL_PREFIX}/share/osm2pgsql\")
