vcpkg/ports/boost-process/opt-filesystem.patch

25 lines
716 B
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c0c1bfef94..3c879b8958 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,7 @@ target_link_libraries(boost_process
Boost::asio
Boost::config
Boost::core
- Boost::filesystem
+ $<TARGET_NAME_IF_EXISTS:Boost::filesystem>
Boost::fusion
Boost::iterator
Boost::move
@@ -28,6 +28,10 @@ target_link_libraries(boost_process
Boost::winapi
)
+if(NOT TARGET Boost::filesystem)
+ target_compile_definitions(boost_process INTERFACE $<$<NOT:$<TARGET_EXISTS:Boost::filesystem>>:BOOST_PROCESS_USE_STD_FS>)
+endif()
+
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)