vcpkg/ports/pdal/fix-gcc8-compatibility.patch

16 lines
547 B
Diff
Raw Normal View History

diff --git a/pdal/util/CMakeLists.txt b/pdal/util/CMakeLists.txt
index 5b48ba8..e031e2b 100644
--- a/pdal/util/CMakeLists.txt
+++ b/pdal/util/CMakeLists.txt
@@ -46,3 +46,10 @@ set_target_properties(${PDAL_UTIL_LIB_NAME} PROPERTIES
CLEAN_DIRECT_OUTPUT 1)
set_property(GLOBAL PROPERTY _UTIL_INCLUDED TRUE)
+
+# Compatibility for GCC8: std::filesystem requires linking with libstdc++fs
+target_link_libraries(
+ ${PDAL_UTIL_LIB_NAME}
+ PRIVATE
+ "$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:-lstdc++fs>"
+)