vcpkg/ports/pdal/use-vcpkg-boost.patch

67 lines
2.0 KiB
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 83a396b..7ebcc3b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,7 +67,8 @@ else()
endif()
set(PDAL_LIB_NAME pdalcpp)
set(PDAL_UTIL_LIB_NAME pdal_util)
-set(PDAL_BOOST_LIB_NAME pdal_boost)
+find_package(Boost COMPONENTS filesystem system REQUIRED)
+set(PDAL_BOOST_LIB_NAME Boost::filesystem Boost::system)
set(PDAL_KAZHDAN_LIB_NAME pdal_kazhdan)
set(PDAL_TEST_SUPPORT_OBJS pdal_test_support)
@@ -179,13 +180,11 @@ endif()
add_subdirectory(plugins)
-#include_directories(vendor/pdalboost)
if (WITH_TESTS)
include (${PDAL_CMAKE_DIR}/gtest.cmake)
add_subdirectory(test)
endif()
add_subdirectory(dimbuilder)
-add_subdirectory(vendor/pdalboost)
add_subdirectory(vendor/arbiter)
add_subdirectory(vendor/kazhdan)
add_subdirectory(pdal/util)
@@ -269,7 +268,6 @@ target_include_directories(${PDAL_BASE_LIB_NAME}
${PROJECT_BINARY_DIR}/include
${PDAL_VENDOR_DIR}
${PDAL_VENDOR_DIR}/eigen
- ${PDAL_VENDOR_DIR}/pdalboost
${LIBXML2_INCLUDE_DIR}
${ZSTD_INCLUDE_DIRS}
${NLOHMANN_INCLUDE_DIR}
diff --git a/pdal/util/CMakeLists.txt b/pdal/util/CMakeLists.txt
index 6b3e889..8a42122 100644
--- a/pdal/util/CMakeLists.txt
+++ b/pdal/util/CMakeLists.txt
@@ -40,8 +40,6 @@ target_link_libraries(${PDAL_UTIL_LIB_NAME}
${CMAKE_DL_LIBS}
${CMAKE_THREAD_LIBS_INIT}
)
-target_include_directories(${PDAL_UTIL_LIB_NAME} PRIVATE
- ${PDAL_VENDOR_DIR}/pdalboost)
set_target_properties(${PDAL_UTIL_LIB_NAME} PROPERTIES
VERSION "${PDAL_BUILD_VERSION}"
diff --git a/pdal/util/FileUtils.cpp b/pdal/util/FileUtils.cpp
index ee47b55..4a57268 100644
--- a/pdal/util/FileUtils.cpp
+++ b/pdal/util/FileUtils.cpp
@@ -98,6 +98,12 @@ inline std::string const& toNative(std::string const& in) { return in; }
} // unnamed namespace
+namespace pdalboost
+{
+ namespace filesystem = boost::filesystem;
+ namespace system = boost::system;
+}
+
namespace FileUtils
{