1 set(LLVM_LINK_COMPONENTS
5 add_clang_executable(c-index-test
13 PROPERTY COMPILE_FLAGS "-std=gnu89"
17 if (LLVM_BUILD_STATIC)
18 target_link_libraries(c-index-test
25 target_link_libraries(c-index-test
36 set_target_properties(c-index-test
40 # If libxml2 is available, make it available for c-index-test.
41 if (CLANG_HAVE_LIBXML)
42 target_link_libraries(c-index-test PRIVATE LibXml2::LibXml2)
45 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
46 if(INTERNAL_INSTALL_PREFIX)
47 set(INSTALL_DESTINATION "${INTERNAL_INSTALL_PREFIX}/bin")
48 set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH
49 "@executable_path/../../lib")
51 set(INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
54 install(TARGETS c-index-test
55 RUNTIME DESTINATION "${INSTALL_DESTINATION}"
56 COMPONENT c-index-test)
58 if (NOT LLVM_ENABLE_IDE)
59 add_llvm_install_targets(install-c-index-test
61 COMPONENT c-index-test)