Skip to content

Commit c9098c6

Browse files
committed
[tools] Add include path for iconv on OpenBSD.
swift-ide-test depends on libxml2. On OpenBSD, libxml2 is configured to use iconv out of the box, but unlike other platforms, iconv is not part of the base installation; it is a separate package, and so resides in /usr/local/include. This should be added to the search path on this platform to ensure correct header resolution.
1 parent 24445dd commit c9098c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/swift-ide-test/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ if(LibXml2_FOUND)
1515
include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR})
1616
target_link_libraries(swift-ide-test PRIVATE ${LIBXML2_LIBRARIES})
1717
target_compile_definitions(swift-ide-test PRIVATE SWIFT_HAVE_LIBXML=1)
18+
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "OpenBSD" AND NOT CMAKE_CROSSCOMPILING)
19+
include_directories(SYSTEM "/usr/local/include")
20+
endif()
1821
endif()
1922

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

0 commit comments

Comments
 (0)