Skip to content

Commit

Permalink
Report PDAL version information in about screen, processing version d…
Browse files Browse the repository at this point in the history
…umps
  • Loading branch information
nyalldawson committed Nov 6, 2020
1 parent f98bdc0 commit 9e72b69
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app/CMakeLists.txt
Expand Up @@ -564,6 +564,12 @@ IF(HAVE_OPENCL)
INCLUDE_DIRECTORIES(SYSTEM ${OpenCL_INCLUDE_DIRS})
ENDIF(HAVE_OPENCL)

IF (HAVE_PDAL)
INCLUDE_DIRECTORIES(SYSTEM
${PDAL_INCLUDE_DIR}
)
ENDIF (HAVE_PDAL)

IF(ENABLE_MODELTEST)
INCLUDE_DIRECTORIES(../../tests/qt_modeltest)
ENDIF(ENABLE_MODELTEST)
Expand Down Expand Up @@ -695,6 +701,12 @@ IF (POSTGRES_FOUND)
TARGET_LINK_LIBRARIES (qgis_app ${POSTGRES_LIBRARY})
ENDIF (POSTGRES_FOUND)

IF (HAVE_PDAL)
TARGET_LINK_LIBRARIES(qgis_app
${PDAL_LIBRARIES}
)
ENDIF (HAVE_PDAL)

IF(MSVC)
INSTALL(FILES qgis.ico qgis-mime.ico qgis-qgs.ico qgis-qlr.ico qgis-qml.ico qgis-qpt.ico DESTINATION ${CMAKE_INSTALL_PREFIX}/icons)
ENDIF(MSVC)
Expand Down
10 changes: 10 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -409,6 +409,10 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
#include <proj_api.h>
#endif

#ifdef HAVE_PDAL
#include <pdal/pdal.hpp>
#endif

//
// Other includes
//
Expand Down Expand Up @@ -5315,6 +5319,12 @@ void QgisApp::about()

versionString += QLatin1String( "</tr><tr>" );

#ifdef HAVE_PDAL
versionString += QStringLiteral( "<td>%1</td><td>%2</td>" ).arg( tr( "Compiled against PDAL" ), PDAL_VERSION );
versionString += QStringLiteral( "<td>%1</td><td>%2</td>" ).arg( tr( "Running against PDAL" ) ).arg( QString::fromStdString( pdal::Config::fullVersionString() ) );
versionString += QLatin1String( "</tr><tr>" );
#endif

versionString += QStringLiteral( "<td>%1</td><td>" ).arg( tr( "PostgreSQL Client Version" ) );
#ifdef HAVE_POSTGRESQL
versionString += QStringLiteral( PG_VERSION );
Expand Down
12 changes: 12 additions & 0 deletions src/core/CMakeLists.txt
Expand Up @@ -1657,6 +1657,12 @@ IF (HAVE_LAZPERF)
)
ENDIF (HAVE_LAZPERF)

IF (HAVE_PDAL)
INCLUDE_DIRECTORIES(SYSTEM
${PDAL_INCLUDE_DIR}
)
ENDIF (HAVE_PDAL)

IF (HAVE_OPENCL)
SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
qgsopenclutils.cpp
Expand Down Expand Up @@ -1800,6 +1806,12 @@ IF (HAVE_ZSTD)
)
ENDIF (HAVE_ZSTD)

IF (HAVE_PDAL)
TARGET_LINK_LIBRARIES(qgis_core
${PDAL_LIBRARIES}
)
ENDIF (HAVE_PDAL)

IF (FORCE_STATIC_PROVIDERS)
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/providers/wms
Expand Down
9 changes: 9 additions & 0 deletions src/core/processing/qgsprocessingfeedback.cpp
Expand Up @@ -26,6 +26,10 @@
#include <proj_api.h>
#endif

#ifdef HAVE_PDAL
#include <pdal/pdal.hpp>
#endif

QgsProcessingFeedback::QgsProcessingFeedback( bool logFeedback )
: mLogFeedback( logFeedback )
{
Expand Down Expand Up @@ -98,6 +102,11 @@ void QgsProcessingFeedback::pushVersionInfo( const QgsProcessingProvider *provid
#else
pushDebugInfo( tr( "PROJ version: %1" ).arg( PJ_VERSION ) );
#endif

#ifdef HAVE_PDAL
pushDebugInfo( tr( "PDAL version: %1" ).arg( QString::fromStdString( pdal::Config::fullVersionString() ) ) );
#endif

if ( provider && !provider->versionInfo().isEmpty() )
{
pushDebugInfo( tr( "%1 version: %2" ).arg( provider->name(), provider->versionInfo() ) );
Expand Down

0 comments on commit 9e72b69

Please sign in to comment.