Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[pdal] fix pthreads on linux + check for pdal >= 2.2 (#40619)
- Loading branch information
Showing
with
11 additions
and
1 deletion.
-
+7
−0
cmake/FindPDAL.cmake
-
+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) |
|
|