Skip to content

Commit a116fb3

Browse files
committed
tools: use LibXml2::LibXml2 to link against
Adjust the build rules to use the `LibXml2::LibXml2` target rather than use the explicit include paths and link flags. This allows us to track additional dependencies (implicit linked libraries) as well as properly propagate the include paths and library search paths. Cherrypick commit #77848
1 parent 6559e5a commit a116fb3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tools/swift-ide-test/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,8 @@ target_link_libraries(swift-ide-test
1717

1818
# If libxml2 is available, make it available for swift-ide-test.
1919
if(LLVM_ENABLE_LIBXML2)
20-
include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR})
21-
target_link_libraries(swift-ide-test PRIVATE ${LIBXML2_LIBRARIES})
20+
target_link_libraries(swift-ide-test PRIVATE LibXml2::LibXml2)
2221
target_compile_definitions(swift-ide-test PRIVATE SWIFT_HAVE_LIBXML=1)
23-
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "OpenBSD" AND NOT CMAKE_CROSSCOMPILING)
24-
include_directories(SYSTEM "/usr/local/include")
25-
endif()
2622
endif()
2723

2824
# Create a symlink for swift-api-dump.py in the bin directory

0 commit comments

Comments
 (0)