Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove remaining pdal_util library references #4267

Merged
merged 4 commits into from Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 11 additions & 38 deletions CMakeLists.txt
Expand Up @@ -35,21 +35,11 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Name of C++ library
#
# To facilitate one-library linking, we do special things for various platforms.
#
# On Linux we install a linker script that we call libpdalcpp.so and it
# in turn links libpdal_base.so and libpdal_util.so
#
# On OSX we reexport the symbols from libpdal_util.dylib into libpdalcpp.dylib
# See below for the rest of the magic.
# Name of C++ library
#

set(PDAL_LIB_NAME pdalcpp)


set(PDAL_UTIL_LIB_NAME pdal_util)
set(PDAL_KAZHDAN_LIB_NAME pdal_kazhdan)
set(PDAL_LEPCC_LIB_NAME pdal_lepcc)
set(PDAL_TEST_SUPPORT_OBJS pdal_test_support)
Expand Down Expand Up @@ -108,6 +98,7 @@ set(PDAL_BUILD_TYPE ${CMAKE_BUILD_TYPE})
# Dependencies.
#------------------------------------------------------------------------------

include(${PDAL_CMAKE_DIR}/backtrace.cmake)
include(${PDAL_CMAKE_DIR}/proj.cmake)
include(${PDAL_CMAKE_DIR}/gdal.cmake)
include(${PDAL_CMAKE_DIR}/geotiff.cmake) # Optional (not really)
Expand Down Expand Up @@ -171,7 +162,6 @@ add_subdirectory(vendor/kazhdan)
add_subdirectory(vendor/lazperf)
add_subdirectory(vendor/utfcpp)
add_subdirectory(vendor/lepcc)
add_subdirectory(pdal/util)
add_subdirectory(tools)
add_subdirectory(apps)

Expand All @@ -180,12 +170,14 @@ file(GLOB BASE_SRCS
${PDAL_IO_DIR}/*.cpp
${PDAL_KERNELS_DIR}/*.cpp
${PDAL_SRC_DIR}/*.cpp
${PDAL_SRC_DIR}/compression/*.cpp)
${PDAL_SRC_DIR}/compression/*.cpp
${PDAL_SRC_DIR}/util/*.cpp)
file(GLOB_RECURSE PRIVATE_SRCS
${PDAL_FILTERS_DIR}/private/*.cpp
${PDAL_IO_DIR}/private/*.cpp
${PDAL_KERNELS_DIR}/private/*.cpp
${PDAL_SRC_DIR}/private/*.cpp)
${PDAL_SRC_DIR}/private/*.cpp
${BACKTRACE_SOURCE})
list(APPEND SRCS ${BASE_SRCS} ${PRIVATE_SRCS})

#
Expand Down Expand Up @@ -217,13 +209,7 @@ if (NOT PDAL_HAVE_LZMA)
list(REMOVE_ITEM SRCS ${LZMA_SRCS})
endif()

if (GDAL_VERSION VERSION_LESS 3.0.0)
file(GLOB PROJPIPELINE_FILTER_SRCS
${PDAL_FILTERS_DIR}/ProjPipelineFilter.cpp)
list(REMOVE_ITEM SRCS ${PROJPIPELINE_FILTER_SRCS})
endif()

PDAL_ADD_LIBRARY(${PDAL_LIB_NAME} ${SRCS} ${RPLY_SRCS} $<TARGET_OBJECTS:${PDAL_UTIL_LIB_NAME}>)
PDAL_ADD_LIBRARY(${PDAL_LIB_NAME} ${SRCS})
add_library(PDAL::PDAL ALIAS ${PDAL_LIB_NAME})
#
# Interface include directories allow downstream project to get the directory
Expand Down Expand Up @@ -260,6 +246,8 @@ target_link_libraries(${PDAL_LIB_NAME}
${PDAL_LEPCC_LIB_NAME}
${PDAL_LAZPERF_LIB_NAME}
${UTFCPP_LIB_NAME}
${BACKTRACE_LIBRARIES}
"$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:-lstdc++fs>"
PUBLIC
${WINSOCK_LIBRARY}
INTERFACE
Expand All @@ -271,21 +259,9 @@ set_target_properties(${PDAL_LIB_NAME} PROPERTIES
SOVERSION ${PDAL_API_VERSION}
CLEAN_DIRECT_OUTPUT 1)


# shut off -Wpedantic selectively
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
set_source_files_properties(filters/PoissonFilter.cpp PROPERTIES COMPILE_FLAGS -Wno-pedantic)
endif()

#
# On Linux, we install a linker script as libpdalcpp.so. That file
# specifies linking in libpdal_base.so and libpdal_util.so. This allows
# users to link a single library, libpdalcpp
#
if (UNIX AND NOT APPLE)
set(LIBNAME ${CMAKE_SHARED_LIBRARY_PREFIX}${PDAL_LIB_NAME})
install(FILES ${LIBNAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}
RENAME ${LIBNAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
set_source_files_properties(filters/PoissonFilter.cpp PROPERTIES COMPILE_FLAGS -Wno-pedantic)
endif()

#
Expand Down Expand Up @@ -364,7 +340,7 @@ install(FILES ${PDAL_CMAKE_DIR}/pluginmacros.cmake
GROUP_EXECUTE WORLD_EXECUTE OWNER_EXECUTE
GROUP_READ WORLD_READ OWNER_READ
OWNER_WRITE
)
)

#
# CPACK
Expand Down Expand Up @@ -393,9 +369,6 @@ include(${PDAL_CMAKE_DIR}/config.cmake)
target_include_directories(${PDAL_LIB_NAME}
INTERFACE
$<INSTALL_INTERFACE:include>)
#target_include_directories(${PDAL_UTIL_LIB_NAME}
# INTERFACE
# $<INSTALL_INTERFACE:include>)

feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES)

Expand Down
15 changes: 15 additions & 0 deletions cmake/backtrace.cmake
@@ -0,0 +1,15 @@
set(FPHSA_NAME_MISMATCHED 1) # Suppress warnings, see https://cmake.org/cmake/help/v3.17/module/FindPackageHandleStandardArgs.html
find_package(Libexecinfo QUIET)
find_package(Libunwind QUIET)
set(FPHSA_NAME_MISMATCHED 0)

if(LIBUNWIND_FOUND AND WITH_BACKTRACE)
set(BACKTRACE_SOURCE ${PDAL_UTIL_DIR}/private/BacktraceUnwind.cpp)
set(BACKTRACE_LIBRARIES ${LIBUNWIND_LIBRARIES} ${CMAKE_DL_LIBS})
elseif(LIBEXECINFO_FOUND AND WITH_BACKTRACE)
set(BACKTRACE_SOURCE ${PDAL_UTIL_DIR}/private/BacktraceExecinfo.cpp)
set(BACKTRACE_LIBRARIES ${LIBEXECINFO_LIBRARIES} ${CMAKE_DL_LIBS})
else()
set(BACKTRACE_SOURCE ${PDAL_UTIL_DIR}/private/BacktraceNone.cpp)
endif()

7 changes: 0 additions & 7 deletions cmake/execinfo.cmake

This file was deleted.

8 changes: 0 additions & 8 deletions cmake/unwind.cmake

This file was deleted.

1 change: 0 additions & 1 deletion libpdalcpp

This file was deleted.

70 changes: 0 additions & 70 deletions pdal/util/CMakeLists.txt

This file was deleted.

10 changes: 8 additions & 2 deletions tools/lasdump/CMakeLists.txt
Expand Up @@ -4,14 +4,20 @@ cmake_minimum_required(VERSION 3.5)
add_executable(lasdump
Dumper.cpp
Header.cpp
${PDAL_UTIL_DIR}/Bounds.cpp
${PDAL_UTIL_DIR}/FileUtils.cpp
${PDAL_UTIL_DIR}/Utils.cpp
)

target_link_libraries(lasdump PRIVATE
${PDAL_UTIL_LIB_NAME}
${PDAL_LAZPERF_LIB_NAME}
)
target_include_directories(lasdump PRIVATE
${PDAL_VENDOR_DIR}
${PDAL_INCLUDE_DIR})
${PDAL_INCLUDE_DIR}
${NLOHMANN_INCLUDE_DIR}
${UTFCPP_INCLUDE_DIR}
)

#
# For byte-ordering functions
Expand Down
1 change: 0 additions & 1 deletion tools/nitfwrap/CMakeLists.txt
Expand Up @@ -14,7 +14,6 @@ pdal_target_compile_settings(nitfwrap)
add_dependencies(nitfwrap generate_dimension_hpp)
target_link_libraries(nitfwrap PRIVATE
${PDAL_BASE_LIB_NAME}
${PDAL_UTIL_LIB_NAME}
${NITRO_LIBRARIES}
)

Expand Down