Skip to content

Commit b172553

Browse files
committedFeb 8, 2022
Cleanup PDAL/EPT handling in cmake
1 parent e85df91 commit b172553

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed
 

‎CMakeLists.txt

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -283,14 +283,8 @@ if(WITH_CORE)
283283
endif(WITH_HANA)
284284

285285
set (WITH_PDAL FALSE CACHE BOOL "Determines whether PDAL support should be built")
286-
if(WITH_PDAL)
287-
set(HAVE_PDAL_QGIS TRUE) # note -- we can't use HAVE_PDAL here as the grass public headers redefine this!
288-
endif()
289286

290287
set (WITH_EPT TRUE CACHE BOOL "Determines whether Entwine Point Cloud (EPT) support should be built")
291-
if(WITH_EPT)
292-
set(HAVE_EPT TRUE)
293-
endif()
294288

295289
set (WITH_THREAD_LOCAL TRUE CACHE BOOL "Determines whether std::thread_local should be used")
296290
mark_as_advanced(WITH_THREAD_LOCAL)
@@ -416,10 +410,7 @@ if(WITH_CORE)
416410
endif()
417411

418412
if (WITH_EPT) # EPT provider
419-
find_package(ZSTD) # for decompression of point clouds
420-
if (NOT ZSTD_FOUND)
421-
message(FATAL_ERROR "ZSTD not found - EPT provider cannot be built")
422-
endif()
413+
find_package(ZSTD REQUIRED) # for decompression of point clouds
423414
find_package(LazPerf) # for decompression of point clouds
424415
if (NOT LazPerf_FOUND)
425416
message(STATUS "Using embedded laz-perf")
@@ -431,10 +422,8 @@ if(WITH_CORE)
431422
if (NOT WITH_EPT)
432423
message(FATAL_ERROR "PDAL provider cannot be built with EPT disabled")
433424
endif()
434-
find_package(PDAL) # PDAL provider
435-
endif()
436-
if (PDAL_FOUND)
437-
set(HAVE_PDAL_QGIS TRUE) # used in qgsconfig.h
425+
find_package(PDAL REQUIRED) # PDAL provider
426+
set(HAVE_PDAL_QGIS TRUE) # used in qgisconfig.h. note -- we can't use HAVE_PDAL here as the grass public headers redefine this!
438427
endif()
439428

440429
#############################################################

0 commit comments

Comments
 (0)
Please sign in to comment.