Making a Cmake package for LLDB

I want to generate a CMake config file to help link to other projects more easily.

install(TARGETS liblldb EXPORT LLDBTargets
    LIBRARY DESTINATION lib
    ARCHIVE DESTINATION lib
    RUNTIME DESTINATION bin
    INCLUDES DESTINATION include
)

include(CMakePackageConfigHelpers)

configure_package_config_file(
  "${CMAKE_CURRENT_SOURCE_DIR}/LLDBConfig.cmake.in"
  "${CMAKE_CURRENT_BINARY_DIR}/LLDBConfig.cmake"
  INSTALL_DESTINATION lib/cmake/clang
)

install(
    EXPORT LLDBTargets
    FILE LLDBTargets.cmake
    DESTINATION lib/cmake/clang
)

But I get the following failures:

CMake Error: install(EXPORT "LLDBTargets" ...) includes target "liblldb" which requires target "lldbPluginUnwindAssemblyInstEmulation" that is not in any export set.
CMake Error: install(EXPORT "LLDBTargets" ...) includes target "liblldb" which requires target "lldbPluginUnwindAssemblyX86" that is not in any export set.

now one way I thought of was to manually add_library each of these and export them. But is there really no easier way?

Hello, try to add these targets to the EXPORT set like this:

install(TARGETS lldbPluginUnwindAssemblyInstEmulation lldbPluginUnwindAssemblyX86
    EXPORT LLDBTargets)