[pdal] 13/16: Add patch to link system libjsoncpp if available.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Fri Apr 1 23:02:35 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository pdal.

commit 4b48aa0a13e7f473661978b95fe265618b5dba2f
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Apr 1 21:28:44 2016 +0200

    Add patch to link system libjsoncpp if available.
---
 debian/patches/jsoncpp.patch | 36 ++++++++++++++++++++++++++++++++++++
 debian/patches/series        |  1 +
 2 files changed, 37 insertions(+)

diff --git a/debian/patches/jsoncpp.patch b/debian/patches/jsoncpp.patch
new file mode 100644
index 0000000..4012355
--- /dev/null
+++ b/debian/patches/jsoncpp.patch
@@ -0,0 +1,36 @@
+Description: Link to system libjsoncpp if available.
+Author: Bas Couwenberg <sebastic at debian.org>
+
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -101,9 +101,18 @@ set(PDAL_BASE_CPP
+   ${PDAL_XML_SRC}
+   ${PDAL_LAZPERF_SRC}
+   ${DB_DRIVER_SRCS}
+-  ${PROJECT_SOURCE_DIR}/vendor/jsoncpp-1.6.2/dist/jsoncpp.cpp
+ )
+ 
++find_package(JSONCPP)
++if(JSONCPP_FOUND)
++  include_directories(${JSONCPP_INCLUDE_DIR})
++else(JSONCPP_FOUND)
++  set(PDAL_BASE_CPP
++    ${PDAL_BASE_CPP}
++    ${PROJECT_SOURCE_DIR}/vendor/jsoncpp-1.6.2/dist/jsoncpp.cpp
++  )
++endif(JSONCPP_FOUND)
++
+ list (APPEND PDAL_CPP ${PDAL_BASE_CPP} )
+ list (APPEND PDAL_HPP ${PDAL_BASE_HPP} )
+ 
+@@ -167,6 +176,10 @@ if (PDAL_HAVE_LIBXML2)
+     target_link_libraries(${PDAL_BASE_LIB_NAME} ${LIBXML2_LIBRARIES})
+ endif()
+ 
++if(JSONCPP_FOUND)
++    target_link_libraries(${PDAL_BASE_LIB_NAME} ${JSONCPP_LIBRARY})
++endif(JSONCPP_FOUND)
++
+ #
+ # On OSX we reexport the symbols in libpdal_util.dylib into libpdalcpp.dylib
+ # so that users only need link libpdalcpp.
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3f015c7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+jsoncpp.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pdal.git



More information about the Pkg-grass-devel mailing list