Skip to content

Commit

Permalink
take advantage of gdal_fwd.hpp when available in GDAL 3.11+ #4607
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Jan 8, 2025
1 parent 212b4b7 commit b9faeec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ PDAL_ADD_LIBRARY(${PDAL_LIB_NAME} ${SRCS})
if (WIN32)
# fix for "error C4005: '_XKEYCHECK_H': macro redefinition"
# C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\
# include\xkeycheck.h(55): fatal error C1189: #error: The C++ Standard Library forbids
# include\xkeycheck.h(55): fatal error C1189: #error: The C++ Standard Library forbids
# macroizing the keyword "bool". Enable warning C4005 to find the forbidden define.
target_compile_definitions(${PDAL_LIB_NAME} PRIVATE _XKEYCHECK_H=1)
endif()
Expand Down
7 changes: 7 additions & 0 deletions pdal/Geometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,16 @@

#include <memory>

#include <gdal_version.h>

// Forward decl
class OGRGeometry;
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3,11,0)
#include <gdal_fwd.h>
#else
using OGRGeometryH = void *;
using OGRSpatialReferenceH = void *;
#endif

namespace pdal
{
Expand Down

0 comments on commit b9faeec

Please sign in to comment.