Skip to content
Permalink
Browse files

[pdal] fix pthreads on linux + check for pdal >= 2.2 (#40619)

  • Loading branch information
wonder-sk committed Dec 16, 2020
1 parent 9763773 commit e066bab310eeb11629bbc9985d5e8dea42589050
Showing with 11 additions and 1 deletion.
  1. +7 −0 cmake/FindPDAL.cmake
  2. +4 −1 src/providers/pdal/CMakeLists.txt
@@ -67,6 +67,13 @@ IF (PDAL_FOUND)
MESSAGE(STATUS "Found PDAL: ${PDAL_LIBRARIES} (${PDAL_VERSION})")
ENDIF (NOT PDAL_FIND_QUIETLY)

IF (PDAL_VERSION_MAJOR LESS 2)
MESSAGE (FATAL_ERROR "PDAL version is too old (${PDAL_VERSION}). Use 2.2 or higher.")
ENDIF()
IF ( (PDAL_VERSION_MAJOR EQUAL 2) AND (PDAL_VERSION_MINOR LESS 2) )
MESSAGE (FATAL_ERROR "PDAL version is too old (${PDAL_VERSION}). Use 2.2 or higher.")
ENDIF()

ELSE (PDAL_FOUND)
IF (PDAL_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find PDAL")
@@ -1,6 +1,8 @@
########################################################
# Files


set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

set(PDAL_SRCS
@@ -119,13 +121,14 @@ set_target_properties(untwine PROPERTIES

target_link_libraries (untwine
${PDAL_LIBRARIES}
Threads::Threads
)
target_include_directories(untwine PRIVATE ${UNTWINE_INCLUDE_DIRS})

add_library (pdalprovider MODULE ${PDAL_SRCS} ${PDAL_HDRS} ${PDAL_GUI_SRCS} ${PDAL_GUI_HDRS})
target_link_libraries (pdalprovider
${PDAL_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
Threads::Threads
)

if (WITH_GUI)

0 comments on commit e066bab

Please sign in to comment.
You can’t perform that action at this time.