Skip to content

Commit 3506f58

Browse files
[CMake] Use LIBXML2_INCLUDE_DIR instead of hardcoding /usr/include/libxml2
`find_package(LibXml2 REQUIRED)` sets `LIBXML2_INCLUDE_DIR` to the correct include directory for the libxml2 headers. Use this variable instead of hardcoding `/usr/include/libxml2`. This allows the build to work with custom libxml2 builds on WASI.
1 parent 7f38264 commit 3506f58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/_CFXMLInterface/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ target_include_directories(_CFXMLInterface
2020
../CoreFoundation/include
2121
PRIVATE
2222
../CoreFoundation/internalInclude
23-
/usr/include/libxml2/)
23+
${LIBXML2_INCLUDE_DIR})
2424

2525
target_compile_options(_CFXMLInterface INTERFACE
2626
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -fmodule-map-file=${CMAKE_CURRENT_SOURCE_DIR}/../CoreFoundation/include/module.modulemap>"

0 commit comments

Comments
 (0)