including generated cmake-files from a ExternalPackage
I have a problem relating to ExterlalPackage
I have to project (main and lib in this example) that is placed in two
directories next to each other where main needs lib to be able to
link. I have created a set up so that the main procject uses
ExternalProject to compile lib. This works flawless but since lib is
cmake based I have a export command that creates a include file that I
want to use when configuring main, but since that is not created until
build time I have problems with using it in main/CMakeLists.txt. A
workaround I have used is distributing a empty include file so that
the configure steps goes through but the linking of main fails on the
first run of make, on the second cmake notices that the include file
is updated and reconfigures.
Anyone have any sugestions about how to solve this?
Side note, I don't know if it complicates things but the builds have
to be runnable in tree (no install step).