then the project’s configuration stage errored out with:
The link interface of target "MYLIB" contains:
boost::boost
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
I know one of the workarounds would be manually setup the cmake so that stuff like INTERFACE_INCLUDE_DIRS and INTERFACE_LINK_LIBRARIES points to the absolute path on disk.
but I feel like this is very wrong and not portable at all. Yet I cant figure out the way to inject code into LLVMExports.cmake prior to the add_library call
I don’t think there’d be opposition to a CMake diff which added support for customizing LLVMConfig.cmake.in via a CMake variable. It’s worth putting up a PR for
LLVMConfig.cmake.in already has variable placeholders like this one, which are set by code like this. You could just add another variable placeholder in LLVMConfig.cmake.in that’s meant to be populated by the user if they want any additions. (configure_file is the CMake mechanism being used here, btw.)