From e6a0026e5176901e7fcfa6eed8e7b4b4e830a2b7 Mon Sep 17 00:00:00 2001 From: Thomas Fischer Date: Wed, 5 Apr 2017 13:51:42 +0200 Subject: [PATCH] Using CMake to locate include directory and libaries --- src/OsmpbfConfig.cmake.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OsmpbfConfig.cmake.in b/src/OsmpbfConfig.cmake.in index 0efc35e..9c9efbd 100644 --- a/src/OsmpbfConfig.cmake.in +++ b/src/OsmpbfConfig.cmake.in @@ -1,3 +1,3 @@ -set(OSMPBF_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include/osmpbf") -set(OSMPBF_LIBRARIES "@CMAKE_INSTALL_PREFIX@/lib/libosmpbf.a") +find_path(OSMPBF_INCLUDE_DIRS NAMES osmpbf/fileformat.pb.h osmpbf/osmformat.pb.h PATHS "@CMAKE_INSTALL_PREFIX@/include") +find_library(OSMPBF_LIBRARIES NAMES osmpbf PATHS "@CMAKE_INSTALL_PREFIX@/lib") set(OSMPBF_VERSION "@OSMPBF_VERSION@")