diff options
Diffstat (limited to 'tools/c-index-test/CMakeLists.txt')
| -rw-r--r-- | tools/c-index-test/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/c-index-test/CMakeLists.txt b/tools/c-index-test/CMakeLists.txt index d38c7bb28709..53e3421f1b35 100644 --- a/tools/c-index-test/CMakeLists.txt +++ b/tools/c-index-test/CMakeLists.txt @@ -40,7 +40,11 @@ set_target_properties(c-index-test # If libxml2 is available, make it available for c-index-test. if (CLANG_HAVE_LIBXML) - include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR}) + if ((CMAKE_OSX_SYSROOT) AND (EXISTS ${CMAKE_OSX_SYSROOT}/${LIBXML2_INCLUDE_DIR})) + include_directories(SYSTEM ${CMAKE_OSX_SYSROOT}/${LIBXML2_INCLUDE_DIR}) + else() + include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR}) + endif() target_link_libraries(c-index-test PRIVATE ${LIBXML2_LIBRARIES}) endif() |
